Skip to content

Commit 2a57b05

Browse files
committed
gh-162034: Quote the utils.sh path in the Apple testbed build phase
The "Process Python libraries" build phase sources utils.sh through an unquoted $PROJECT_DIR. The build fails when the project path contains a space, and a *, ? or [ in the path is glob-expanded, so the phase can source another directory's utils.sh. Quote the path in the four testbed projects.
1 parent 8750d38 commit 2a57b05

5 files changed

Lines changed: 6 additions & 4 deletions

File tree

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
The Apple testbed projects now build when the path of the project contains a
2+
space.

‎Platforms/Apple/testbed/iOSTestbed.xcodeproj/project.pbxproj‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@
250250
);
251251
runOnlyForDeploymentPostprocessing = 0;
252252
shellPath = /bin/sh;
253-
shellScript = "set -e\nsource $PROJECT_DIR/Python{{abiflags}}.xcframework/build/utils.sh\ninstall_python Python{{abiflags}}.xcframework app app_packages\n";
253+
shellScript = "set -e\nsource \"$PROJECT_DIR/Python{{abiflags}}.xcframework/build/utils.sh\"\ninstall_python Python{{abiflags}}.xcframework app app_packages\n";
254254
showEnvVarsInLog = 0;
255255
};
256256
/* End PBXShellScriptBuildPhase section */

‎Platforms/Apple/testbed/tvOSTestbed.xcodeproj/project.pbxproj‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@
236236
);
237237
runOnlyForDeploymentPostprocessing = 0;
238238
shellPath = /bin/sh;
239-
shellScript = "set -e\n\nsource $PROJECT_DIR/Python{{abiflags}}.xcframework/build/utils.sh\n\ninstall_python Python{{abiflags}}.xcframework app app_packages\n";
239+
shellScript = "set -e\n\nsource \"$PROJECT_DIR/Python{{abiflags}}.xcframework/build/utils.sh\"\n\ninstall_python Python{{abiflags}}.xcframework app app_packages\n";
240240
showEnvVarsInLog = 0;
241241
};
242242
/* End PBXShellScriptBuildPhase section */

‎Platforms/Apple/testbed/visionOSTestbed.xcodeproj/project.pbxproj‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@
250250
);
251251
runOnlyForDeploymentPostprocessing = 0;
252252
shellPath = /bin/sh;
253-
shellScript = "set -e\n\nsource $PROJECT_DIR/Python{{abiflags}}.xcframework/build/utils.sh\n\ninstall_python Python{{abiflags}}.xcframework app app_packages\n";
253+
shellScript = "set -e\n\nsource \"$PROJECT_DIR/Python{{abiflags}}.xcframework/build/utils.sh\"\n\ninstall_python Python{{abiflags}}.xcframework app app_packages\n";
254254
showEnvVarsInLog = 0;
255255
};
256256
/* End PBXShellScriptBuildPhase section */

‎Platforms/Apple/testbed/watchOSTestbed.xcodeproj/project.pbxproj‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@
236236
);
237237
runOnlyForDeploymentPostprocessing = 0;
238238
shellPath = /bin/sh;
239-
shellScript = "set -e\n\nsource $PROJECT_DIR/Python{{abiflags}}.xcframework/build/utils.sh\n\ninstall_python Python{{abiflags}}.xcframework app app_packages\n";
239+
shellScript = "set -e\n\nsource \"$PROJECT_DIR/Python{{abiflags}}.xcframework/build/utils.sh\"\n\ninstall_python Python{{abiflags}}.xcframework app app_packages\n";
240240
showEnvVarsInLog = 0;
241241
};
242242
/* End PBXShellScriptBuildPhase section */

0 commit comments

Comments
 (0)