build: exit on unsupported host OS for Android

The Android configure script throws an unhelpful error message telling
the user that `toolchain_path` is not defined when the script is run on
an unsupported host OS, exit with a more helpful message instead while
listing the supported host OSes.

PR-URL: https://github.com/nodejs/node/pull/52882
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
pull/53147/head
Mohammed Keyvanzadeh 2024-05-25 11:09:56 +03:30 committed by GitHub
parent 2079a7aec4
commit 0cbbab9a4d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -10,8 +10,8 @@ def patch_android():
os.system('patch -f ./deps/v8/src/trap-handler/trap-handler.h < ./android-patches/trap-handler.h.patch')
print("\033[92mInfo: \033[0m" + "Tried to patch.")
if platform.system() == "Windows":
print("android-configure is not supported on Windows yet.")
if platform.system() != "Linux" and platform.system() != "Darwin":
print("android-configure is currently only supported on Linux and Darwin.")
sys.exit(1)
if len(sys.argv) == 2 and sys.argv[1] == "patch":