mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 05:27:21 +00:00
modify the meassage in kubectl secret command when the envFile path is not an file path
This commit is contained in:
parent
53a66020e4
commit
e85d561d1f
@ -217,7 +217,7 @@ func handleFromEnvFileSource(secret *api.Secret, envFileSource string) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if info.IsDir() {
|
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 {
|
return addFromEnvFile(envFileSource, func(key, value string) error {
|
||||||
|
Loading…
Reference in New Issue
Block a user