From 10003ec2bbe812cabfabeb75c5a30885cc4fd972 Mon Sep 17 00:00:00 2001 From: Mark Woods Date: Sat, 4 Nov 2023 18:12:11 +0000 Subject: [PATCH] Fix eval of env vars, write prompt to stderr Sorry, I broke the evaluation of environment variables written to stdout using the --env option by replacing getpass.getpass with builtins.input (getpass prompt is written to stderr, input prompt is written to stdout) --- awsmfa/__main__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/awsmfa/__main__.py b/awsmfa/__main__.py index d9a2a99..08c684c 100755 --- a/awsmfa/__main__.py +++ b/awsmfa/__main__.py @@ -168,7 +168,8 @@ def acquire_code(args, session, session3): token_code = args.token_code if token_code is None: while token_code is None or len(token_code) != 6: - token_code = input("MFA Token Code: ") + sys.stderr.write("MFA Token Code: ") + token_code = input() return serial_number, token_code, OK