From 680fe471c57668b9a4e4e33c84e391d64ce727fc Mon Sep 17 00:00:00 2001 From: tegwick Date: Fri, 28 Aug 2026 11:06:53 +0200 Subject: [PATCH] fix(bao-session): drop the TTY guard on login MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The OIDC flow reads nothing from stdin — it starts a local callback listener, prints a URL, and waits for the browser. The guard was copied from scripts that prompt for secrets, where it belongs, and here it only blocked the non-interactive invocation the flow supports. Co-Authored-By: Claude Opus 5 Assistant: claude-code Assistant-Model: opus Assistant-Process: 3377672@bnt-lap001 Assistant-Session: 15463ccf-238f-4e13-b163-93aa25c6d166 --- scripts/bao-session.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/bao-session.sh b/scripts/bao-session.sh index acf1f44..010a6c6 100755 --- a/scripts/bao-session.sh +++ b/scripts/bao-session.sh @@ -65,9 +65,9 @@ cmd_status() { } cmd_login() { - if [[ ! -t 0 ]]; then - red "login needs an interactive terminal."; exit 2 - fi + # No TTY guard: the OIDC flow reads nothing from stdin. It starts a local + # callback listener, prints a URL, and waits for the browser to complete it, + # so this works fine from a non-interactive invocation. echo "Opening OIDC login. Under WSL2 no browser will launch —" echo "copy the URL below into your Windows browser, then come back here." echo