You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by el...@apache.org on 2022/11/30 07:52:12 UTC
[airflow] branch main updated: better warning messages when running breeze in rosetta (#27874)
This is an automated email from the ASF dual-hosted git repository.
eladkal pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 527fbce462 better warning messages when running breeze in rosetta (#27874)
527fbce462 is described below
commit 527fbce462429fc9836837378f801eed4e9d194f
Author: Raphaƫl Vandon <11...@users.noreply.github.com>
AuthorDate: Wed Nov 30 08:52:05 2022 +0100
better warning messages when running breeze in rosetta (#27874)
---
dev/breeze/src/airflow_breeze/commands/main_command.py | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/dev/breeze/src/airflow_breeze/commands/main_command.py b/dev/breeze/src/airflow_breeze/commands/main_command.py
index 13faf884f2..b217ae1b22 100644
--- a/dev/breeze/src/airflow_breeze/commands/main_command.py
+++ b/dev/breeze/src/airflow_breeze/commands/main_command.py
@@ -135,14 +135,17 @@ def check_for_python_emulation():
"[warning]You likely installed your Python wrongly and you should "
"remove it and reinstall from scratch[/]\n"
)
- from inputimeout import inputimeout
+ from inputimeout import TimeoutOccurred, inputimeout
user_status = inputimeout(
- prompt="Are you REALLY sure you want to continue? (press y otherwise we exit in 20s) ",
+ prompt="Are you REALLY sure you want to continue? (answer with y otherwise we exit in 20s)\n",
timeout=20,
)
if not user_status.upper() in ["Y", "YES"]:
sys.exit(1)
+ except TimeoutOccurred:
+ get_console().print("\nNo answer, exiting...")
+ sys.exit(1)
except subprocess.CalledProcessError:
pass
except PermissionError:
@@ -178,14 +181,17 @@ def check_for_rosetta_environment():
"If you have mixed Intel/ARM binaries installed you should likely nuke and "
"reinstall your development environment (including brew and Python) from scratch!\n\n"
)
- from inputimeout import inputimeout
+ from inputimeout import TimeoutOccurred, inputimeout
user_status = inputimeout(
- prompt="Are you REALLY sure you want to continue? (press y otherwise we exit in 20s) ",
+ prompt="Are you REALLY sure you want to continue? (answer with y otherwise we exit in 20s)\n",
timeout=20,
)
if not user_status.upper() in ["Y", "YES"]:
sys.exit(1)
+ except TimeoutOccurred:
+ get_console().print("\nNo answer, exiting...")
+ sys.exit(1)
except subprocess.CalledProcessError:
pass
except PermissionError: