diff options
author | François-Denis Gonthier <francois-denis.gonthier@opersys.com> | 2020-10-06 18:29:25 +0300 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2020-12-27 18:49:11 +0300 |
commit | 6c50d744b311e4ed0ca73d6869abd9bb68d696c6 (patch) | |
tree | 7fc47b23bddf631bdf4d3e24498b9c5336d07a33 /android-configure | |
parent | acaa58e60260225ac935b385d6cc799b446e8799 (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" |