mirror of
https://github.com/ahmetb/kubectx.git
synced 2025-08-25 18:38:35 +00:00
Duplicated
This commit is contained in:
parent
f95e54131e
commit
03be094573
@ -7,7 +7,6 @@ import (
|
||||
"facette.io/natsort"
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"github.com/ahmetb/kubectx/internal/cmdutil"
|
||||
"github.com/ahmetb/kubectx/internal/kubeconfig"
|
||||
"github.com/ahmetb/kubectx/internal/printer"
|
||||
)
|
||||
@ -19,10 +18,6 @@ func (_ ListOp) Run(stdout, stderr io.Writer) error {
|
||||
kc := new(kubeconfig.Kubeconfig).WithLoader(kubeconfig.DefaultLoader)
|
||||
defer kc.Close()
|
||||
if err := kc.Parse(); err != nil {
|
||||
if cmdutil.IsNotFoundErr(err) {
|
||||
printer.Warning(stderr, "kubeconfig file not found")
|
||||
return nil
|
||||
}
|
||||
return errors.Wrap(err, "kubeconfig error")
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user