Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build phase fails when SRCROOT contains a space character #31

Open
ashikase opened this issue Feb 14, 2025 · 0 comments
Open

Build phase fails when SRCROOT contains a space character #31

ashikase opened this issue Feb 14, 2025 · 0 comments

Comments

@ashikase
Copy link

The script for the build phase Copy GoogleService-Info.plist fails when SRCROOT contains a space character, e.g., /path/to/folder of/Alfie-iOS.

shellScript = "if [ \"${ENABLE_PREVIEWS}\" = \"YES\" ]; then\n echo \"Building for Previews, ignore copy to avoid build loop issues.\"\n exit 0;\nfi\n\nif [ \"${CONFIGURATION}\" = \"Release\" ]; then\n SOURCE_CONFIG_PATH=$SRCROOT/Alfie/Configuration/Release/GoogleService-Info.plist\nelse \n SOURCE_CONFIG_PATH=$SRCROOT/Alfie/Configuration/Debug/GoogleService-Info.plist\nfi\n\nDESTINATION_CONFIG_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/GoogleService-Info.plist\"\n\necho \"Will copy ${SOURCE_CONFIG_PATH} to ${DESTINATION_CONFIG_PATH}\"\ncp $SOURCE_CONFIG_PATH $DESTINATION_CONFIG_PATH\n";

The last line of the script:

cp $SOURCE_CONFIG_PATH $DESTINATION_CONFIG_PATH

...should be:

cp "$SOURCE_CONFIG_PATH" "$DESTINATION_CONFIG_PATH"

(Technically, for this issue, quotes are only needed around the first variable.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant