diff options
author | François-Denis Gonthier <francois-denis.gonthier@opersys.com> | 2020-10-06 18:29:25 +0300 |
---|---|---|
committer | Danielle Adams <adamzdanielle@gmail.com> | 2021-01-12 15:10:06 +0300 |
commit | ffaa8c173555465d5a5fe018dfd7a14a1d8618f5 (patch) | |
tree | bf2435c25b2ff7deaa4acdd286fe5e161e5d574e /android-configure | |
parent | 9156f430b5889623b5a8ebef9059ec7212a31b8a (diff) |
build: do not "exit" a script meant to be "source"d
Running exit in a script meant to be sourced means the user shell will
exit, which prevents seeing the error message, and is generally very
annoying.
Fix the "android-configure" script to use "return" instead of "exit".
PR-URL: https://github.com/nodejs/node/pull/35520
Fixes: https://github.com/nodejs/node/issues/35519
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Diffstat (limited to 'android-configure')
-rwxr-xr-x | android-configure | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/android-configure b/android-configure index e3f4a721827..ecb13f399e4 100755 --- a/android-configure +++ b/android-configure @@ -10,7 +10,7 @@ if [ $# -ne 3 ]; then echo "$0 should have 3 parameters: ndk_path, target_arch and sdk_version" - exit 1 + return 1 fi NDK_PATH=$1 @@ -44,7 +44,7 @@ case $ARCH in ;; *) echo "Unsupported architecture provided: $ARCH" - exit 1 + return 1 ;; esac @@ -58,7 +58,7 @@ major=$(echo $host_gcc_version | awk -F . '{print $1}') minor=$(echo $host_gcc_version | awk -F . '{print $2}') if [ -z $major ] || [ -z $minor ] || [ $major -lt 6 ] || [ $major -eq 6 -a $minor -lt 3 ]; then echo "host gcc $host_gcc_version is too old, need gcc 6.3.0" - exit 1 + return 1 fi SUFFIX="$TOOLCHAIN_NAME$ANDROID_SDK_VERSION" |