From 38921b38056fa5c2d79072d68876c1541bfd3fb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois-Denis=20Gonthier?= Date: Tue, 6 Oct 2020 11:29:25 -0400 Subject: [PATCH] build: do not "exit" a script meant to be "source"d MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- android-configure | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/android-configure b/android-configure index e3f4a721827e84..ecb13f399e4d5d 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"