mirror of
https://github.com/zebrajr/node.git
synced 2025-12-06 00:20:08 +01:00
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>
This commit is contained in:
parent
9156f430b5
commit
ffaa8c1735
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user