--key - waits on standard input without saying so #75

Closed
opened 2026-11-17 21:13:00 +00:00 by jcoffey-dev · 1 comment
Owner

Reported in https://community.coffeylabs.org/t/232 (post 34): inbuxa upgrade --key - just sat there, and it took half an hour to realise it was waiting for the key to be pasted.

readKey (cmd/inbuxa/main.go) reads a line from stdin with no prompt. join has its own copy of the same read, and certs --key - / dns --refresh --key - do the same.

Fix: when stdin is a terminal (tui.IsTerminal), print something like API key (paste it and press Enter): to stderr and read it without echo. Piped input stays as it is. Use one helper everywhere --key - / --token - is read.

Reported in https://community.coffeylabs.org/t/232 (post 34): `inbuxa upgrade --key -` just sat there, and it took half an hour to realise it was waiting for the key to be pasted. `readKey` (cmd/inbuxa/main.go) reads a line from stdin with no prompt. `join` has its own copy of the same read, and `certs --key -` / `dns --refresh --key -` do the same. Fix: when stdin is a terminal (`tui.IsTerminal`), print something like `API key (paste it and press Enter):` to stderr and read it without echo. Piped input stays as it is. Use one helper everywhere `--key -` / `--token -` is read.
jcoffey-dev added this to the 27.1 milestone 2026-11-17 21:13:00 +00:00
jcoffey-dev added the bug
priority
p3
labels 2026-11-17 21:13:00 +00:00
jcoffey-dev self-assigned this 2026-11-18 06:28:53 +00:00
Author
Owner

Fixed in #90, thanks to the report in https://community.coffeylabs.org/t/232 (post 34).

On a terminal, --key - now says what it's waiting for: API key (paste it and press Enter): , and the pasted key isn't echoed. --token - does the same. Piped input (echo "$KEY" | inbuxa upgrade --key -) works as before, with no prompt. Every command that takes --key - (install, upgrade, join, certs, dns --refresh) now reads it the same way.

It'll be in the next installer release candidate.

Fixed in #90, thanks to the report in https://community.coffeylabs.org/t/232 (post 34). On a terminal, `--key -` now says what it's waiting for: `API key (paste it and press Enter): `, and the pasted key isn't echoed. `--token -` does the same. Piped input (`echo "$KEY" | inbuxa upgrade --key -`) works as before, with no prompt. Every command that takes `--key -` (install, upgrade, join, certs, dns --refresh) now reads it the same way. It'll be in the next installer release candidate.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: inbuxa/inbuxa-installer#75