modify the meassage in kubectl secret command when the envFile path is not an file path

This commit is contained in:
devinyan 2017-06-26 16:30:43 +08:00
parent 53a66020e4
commit e85d561d1f

View File

@ -217,7 +217,7 @@ func handleFromEnvFileSource(secret *api.Secret, envFileSource string) error {
}
}
if info.IsDir() {
return fmt.Errorf("must be a file")
return fmt.Errorf("env secret file cannot be a directory")
}
return addFromEnvFile(envFileSource, func(key, value string) error {