Skip to content

Commit

Permalink
build_framework.ios.sh: echo/exit from current shell (#900)
Browse files Browse the repository at this point in the history
The `()` syntax spawns a subshell and executes the commands. Hence, the "successful" `exit 0` is trapped and is effectively a no-op. This change instead moves the execution of the `echo` statement to the parent shell which causes the `exit 0` to actually kill the process where it is.
  • Loading branch information
rye authored and rotemmiz committed Aug 26, 2018
1 parent 0968cd9 commit a321e9b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion detox/scripts/build_framework.ios.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash -e -x

# Ensure Xcode is installed or print a warning message and return.
xcodebuild -version &>/dev/null || (echo "WARNING: Xcode is not installed on this machine. Skipping iOS framework build phase" && exit 0)
xcodebuild -version &>/dev/null || { echo "WARNING: Xcode is not installed on this machine. Skipping iOS framework build phase"; exit 0; }

detoxRootPath="$(dirname $(dirname ${0}))"
detoxVersion=`node -p "require('${detoxRootPath}/package.json').version"`
Expand Down

0 comments on commit a321e9b

Please # to comment.