From acdbc789551c5be609231c9745f93abbb5ee653f Mon Sep 17 00:00:00 2001 From: Mohammed Keyvanzadeh Date: Sat, 25 May 2024 11:09:56 +0330 Subject: [PATCH] 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 Reviewed-By: James M Snell --- android_configure.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android_configure.py b/android_configure.py index a82bb56bc5f5b6..5cea0393f48a76 100644 --- a/android_configure.py +++ b/android_configure.py @@ -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":