From 2ae770c66b7450c6f50b735e082ad316f06d26ef Mon Sep 17 00:00:00 2001 From: Paul Schreiber Date: Tue, 9 Jan 2024 22:27:11 -0500 Subject: [PATCH] Properly handle targets with spaces in their names Use quotes around the argument to basename path. Ensures this succeeds when the Xcode target name has spaces. --- packages/react-native/scripts/react-native-xcode.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/scripts/react-native-xcode.sh b/packages/react-native/scripts/react-native-xcode.sh index fabf14fef34641..3e1742cd8d1f27 100755 --- a/packages/react-native/scripts/react-native-xcode.sh +++ b/packages/react-native/scripts/react-native-xcode.sh @@ -127,7 +127,7 @@ fi PACKAGER_SOURCEMAP_FILE= if [[ $EMIT_SOURCEMAP == true ]]; then if [[ $USE_HERMES != false ]]; then - PACKAGER_SOURCEMAP_FILE="$CONFIGURATION_BUILD_DIR/$(basename $SOURCEMAP_FILE)" + PACKAGER_SOURCEMAP_FILE="$CONFIGURATION_BUILD_DIR/$(basename "$SOURCEMAP_FILE")" else PACKAGER_SOURCEMAP_FILE="$SOURCEMAP_FILE" fi