mirror of
https://github.com/rancher/rke.git
synced 2025-08-31 14:36:32 +00:00
Merge pull request #126 from galal-hussein/warning_on_remove
Add replace fatal with warning when can't remove local kubeconfig
This commit is contained in:
@@ -111,11 +111,11 @@ func DeployAdminConfig(kubeConfig, localConfigPath string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func RemoveAdminConfig(localConfigPath string) error {
|
||||
func RemoveAdminConfig(localConfigPath string) {
|
||||
logrus.Infof("Removing local admin Kubeconfig: %s", localConfigPath)
|
||||
if err := os.Remove(localConfigPath); err != nil {
|
||||
return fmt.Errorf("Failed to remove local admin Kubeconfig file: %v", err)
|
||||
logrus.Warningf("Failed to remove local admin Kubeconfig file: %v", err)
|
||||
return
|
||||
}
|
||||
logrus.Infof("Local admin Kubeconfig removed successfully")
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user