mirror of
https://github.com/skoelle/kctl-tui.git
synced 2026-09-17 20:10:24 +00:00
Fix: no-args should start TUI, not print help
The condition showHelp||len(filtered)==0 caused the tool to always print usage and exit. Now only --help triggers usage+exit.
This commit is contained in:
@@ -40,10 +40,13 @@ func main() {
|
||||
kubeexec.SetVerbose(true, os.Stderr)
|
||||
}
|
||||
|
||||
if showHelp || len(filtered) == 0 {
|
||||
if showHelp {
|
||||
printUsage()
|
||||
return
|
||||
}
|
||||
if len(filtered) == 0 {
|
||||
// No subcommand — start the full TUI.
|
||||
}
|
||||
|
||||
if len(filtered) > 0 {
|
||||
switch filtered[0] {
|
||||
|
||||
Reference in New Issue
Block a user