Summary
hookdeck login -i with no terminal surfaces a raw Go termios error instead of an actionable message.
Reproduce
hookdeck login -i --hookdeck-config <empty.toml> </dev/null
→ Enter your CLI API key: operation not supported by device
Exit 1, instantly.
Assessment
The behaviour is correct — it fails fast rather than hanging, which is what a headless environment needs. Only the message is wrong: operation not supported by device is the termios error surfaced verbatim, and tells the user nothing about what to do.
Suggested fix
Detect the absent terminal before attempting the prompt, and emit something in the style the codebase already uses elsewhere — e.g. "interactive sign-in needs a terminal; use hookdeck login --cli-key <key> or hookdeck ci --api-key <key> instead."
The rejected-key path in pkg/login/client_login.go already produces a message of the right quality; this path should match it.
Testing
Unit, alongside the existing stubs for stdinIsTerminal in pkg/login/client_login_test.go.
Related
Filed by Claude on Phil's behalf, from release-candidate testing.
Summary
hookdeck login -iwith no terminal surfaces a raw Go termios error instead of an actionable message.Reproduce
Exit 1, instantly.
Assessment
The behaviour is correct — it fails fast rather than hanging, which is what a headless environment needs. Only the message is wrong:
operation not supported by deviceis the termios error surfaced verbatim, and tells the user nothing about what to do.Suggested fix
Detect the absent terminal before attempting the prompt, and emit something in the style the codebase already uses elsewhere — e.g. "interactive sign-in needs a terminal; use
hookdeck login --cli-key <key>orhookdeck ci --api-key <key>instead."The rejected-key path in
pkg/login/client_login.goalready produces a message of the right quality; this path should match it.Testing
Unit, alongside the existing stubs for
stdinIsTerminalinpkg/login/client_login_test.go.Related
Filed by Claude on Phil's behalf, from release-candidate testing.