Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ffaa8c1

Browse filesBrowse files
fdgonthierdanielleadams
authored andcommitted
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: #35520 Fixes: #35519 Reviewed-By: Michaël Zasso <targos@protonmail.com>
1 parent 9156f43 commit ffaa8c1
Copy full SHA for ffaa8c1

File tree

Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Open diff view settings
Collapse file

‎android-configure‎

Copy file name to clipboardExpand all lines: android-configure
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
if [ $# -ne 3 ]; then
1212
echo "$0 should have 3 parameters: ndk_path, target_arch and sdk_version"
13-
exit 1
13+
return 1
1414
fi
1515

1616
NDK_PATH=$1
@@ -44,7 +44,7 @@ case $ARCH in
4444
;;
4545
*)
4646
echo "Unsupported architecture provided: $ARCH"
47-
exit 1
47+
return 1
4848
;;
4949
esac
5050

@@ -58,7 +58,7 @@ major=$(echo $host_gcc_version | awk -F . '{print $1}')
5858
minor=$(echo $host_gcc_version | awk -F . '{print $2}')
5959
if [ -z $major ] || [ -z $minor ] || [ $major -lt 6 ] || [ $major -eq 6 -a $minor -lt 3 ]; then
6060
echo "host gcc $host_gcc_version is too old, need gcc 6.3.0"
61-
exit 1
61+
return 1
6262
fi
6363

6464
SUFFIX="$TOOLCHAIN_NAME$ANDROID_SDK_VERSION"

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.