Skip to content

Commit

Permalink
fix: (config) only respect the --command flag once
Browse files Browse the repository at this point in the history
We want to switch to the command specified by the flag, but only at startup.

Afterwards, we should be interactive and favor the user's command choices over the startup commandline switch.
  • Loading branch information
tyzbit committed May 18, 2023
1 parent a8e0942 commit 05a4708
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,10 @@ func (c *Config) ActiveView() string {
cmd := cl.View.Active
if c.K9s.manualCommand != nil && *c.K9s.manualCommand != "" {
cmd = *c.K9s.manualCommand
// We reset the manualCommand property becuase
// the command-line switch should only be considered once,
// on startup.
*c.K9s.manualCommand = ""
}

return cmd
Expand Down

0 comments on commit 05a4708

Please sign in to comment.