[BUG] Build steps that have shell commands lose formatting when project is saved
michalszelagsonos opened this issue · 0 comments
michalszelagsonos commented
Describe the bug
I have a project that contains a couple builds steps with shell command. When I save the project, the steps are modified such that quotes and newlines are removed. Here's a git diff showing how the step gets mangled:
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "scripts/swiftlint.sh\n";
+ shellScript = scripts/swiftlint.sh
+;
You can see how quotes and newlines are lost.
System information
- pbxproj version used:
4.0.0
- python version used:
3.11
- Xcode version used:
15.2
To Reproduce
Steps to reproduce the behavior:
- Add a shell script as a build step into your Xcode project.
- Save the project.
- Load the project in python and save it.
project = pbxproj.XcodeProject.load("path to your project.pbxproj file") project.save()
- Inspect your
project.pbxproj
file, you will see that your build step will lose quotes and newline character.
Expected behavior
Loading and saving the project should preserve the entries, as is.