fix: (config) only respect the --command flag once (#2096)
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.mine
parent
288a9d0e87
commit
91cac5e979
|
|
@ -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 because
|
||||
// the command-line switch should only be considered once,
|
||||
// on startup.
|
||||
*c.K9s.manualCommand = ""
|
||||
}
|
||||
|
||||
return cmd
|
||||
|
|
|
|||
Loading…
Reference in New Issue