Skip to content
This repository has been archived by the owner on May 1, 2020. It is now read-only.

Commit

Permalink
will not exit when no kubeconfig found
Browse files Browse the repository at this point in the history
  • Loading branch information
yashbhutwala committed Jun 26, 2019
1 parent 03a5e27 commit dc5a611
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions pkg/synopsysctl/cmd_root.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ var rootCmd = &cobra.Command{
}
// Sets kubeconfig and initializes resource client libraries
if err := setResourceClients(); err != nil {
log.Error(err)
os.Exit(1)
log.Warnf("resource clients were not set properly, %v", err)
}
return nil
},
Expand Down
2 changes: 1 addition & 1 deletion pkg/synopsysctl/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func setResourceClients() error {
restconfig, err = protoform.GetKubeConfig(kubeconfig, insecureSkipTLSVerify)
log.Debugf("rest config: %+v", restconfig)
if err != nil {
return err
return fmt.Errorf("Errored, possibly due to not being connected to a cluster, in which case ignore: %v", err)
}
kubeClient, err = getKubeClient(restconfig)
if err != nil {
Expand Down

0 comments on commit dc5a611

Please sign in to comment.