Problem
talm dashboard --nodes $NODE --endpoints $NODE under a non-tty stdin panics in gdamore/tcell rather than failing gracefully with a "needs an interactive terminal" hint.
Reproduction
timeout 3 talm dashboard --nodes $NODE --endpoints $NODE < /dev/null
Output:
panic: close of nil channel
goroutine 150 [running]:
github.com/gdamore/tcell/v2.(*tScreen).finish(...)
/Users/lex/go/pkg/mod/github.com/gdamore/tcell/v2@v2.13.8/tscreen.go:374
...
exit: 2
The panic comes from tcell's terminal teardown after init refuses to allocate a tty. Upstream issue, but the talm wrapper has the contextual information to refuse earlier with a friendly hint instead.
Expected
pkg/commands/talosctl_wrapper.go (or the dashboard subcommand if it lives in talm) detects non-tty stdin (the same term.IsTerminal(int(os.Stdin.Fd())) check we use for init --update post-#174) and returns:
error: talm dashboard requires an interactive terminal (stdin is not a tty)
hint: run from an attached shell. Scripted use: talm get / talm logs cover most of the dashboard's data.
Cost: a few-line guard. Currently the operator sees a Go stack trace that suggests a bug.
Why this matters
talm dashboard is a popular discovery tool — operators run it locally to inspect a cluster. Some IDE terminals (VS Code's integrated terminal in some configurations, tmux+ssh pipes) present as non-tty under quirky setups. The panic looks like a talm crash, not a misconfiguration.
Same guard would apply to talm edit machineconfig (which currently hangs forever instead of erroring).
Surfaced during the dev17 manual test plan exercise.
Problem
talm dashboard --nodes $NODE --endpoints $NODEunder a non-tty stdin panics ingdamore/tcellrather than failing gracefully with a "needs an interactive terminal" hint.Reproduction
Output:
The panic comes from tcell's terminal teardown after init refuses to allocate a tty. Upstream issue, but the talm wrapper has the contextual information to refuse earlier with a friendly hint instead.
Expected
pkg/commands/talosctl_wrapper.go(or the dashboard subcommand if it lives in talm) detects non-tty stdin (the sameterm.IsTerminal(int(os.Stdin.Fd()))check we use forinit --updatepost-#174) and returns:Cost: a few-line guard. Currently the operator sees a Go stack trace that suggests a bug.
Why this matters
talm dashboardis a popular discovery tool — operators run it locally to inspect a cluster. Some IDE terminals (VS Code's integrated terminal in some configurations, tmux+ssh pipes) present as non-tty under quirky setups. The panic looks like a talm crash, not a misconfiguration.Same guard would apply to
talm edit machineconfig(which currently hangs forever instead of erroring).Surfaced during the dev17 manual test plan exercise.