switch contexts only when needed (#2433)

mine
Jayson Wang 2024-01-08 01:03:59 +08:00 committed by GitHub
parent fa4d3acbd1
commit 96a7e5a4d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -439,7 +439,7 @@ func (a *App) isValidNS(ns string) (bool, error) {
func (a *App) switchContext(ci *cmd.Interpreter) error {
name, ok := ci.HasContext()
if !ok {
if !ok || a.Config.ActiveContextName() == name {
return nil
}