github-actions[bot] opened a new pull request, #76195: URL: https://github.com/apache/airflow/pull/76195
* Keep airflowctl auth token stdout limited to the token `airflowctl auth token` is meant to be captured, e.g. `TOKEN=$(airflowctl auth token ...)`. The username prompt was written to stdout via input(), so in that usage the prompt was invisible to the user and ended up inside the captured value; the failure message also went to stdout. Without a TTY and without credentials, the command crashed with an EOFError traceback instead of a clear error. Prompts and errors now go to stderr, and missing credentials in a non-interactive context exit with a clear message, mirroring what `airflowctl auth login` already does. * Let airflowctl auth token read a piped password without a TTY Only refuse to run when the username is missing and stdin is not a TTY (or is closed); the password still goes through getpass, which reads from /dev/tty when available and falls back to stdin. This keeps 'echo "$PW" | airflowctl auth token --username u' and prompts on /dev/tty with redirected stdin working, so scripts need not put the password on argv. EOF while reading the password exits 1 with a clear stderr message. Document the non-interactive options in the help text. (cherry picked from commit 283ab98d65943fefc74c70cdffcd8982c1f4479a) Co-authored-by: Shawn Sun <[email protected]> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
