mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 02:41:25 +00:00
Check config path for command "kubeadm alpha phase kubelet write-env-file"
This commit is contained in:
parent
81c6b735fa
commit
3f2c7b6fda
@ -125,6 +125,10 @@ func NewCmdKubeletWriteEnvFile() *cobra.Command {
|
||||
Long: kubeletWriteEnvFileLongDesc,
|
||||
Example: kubeletWriteEnvFileExample,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
if len(cfgPath) == 0 {
|
||||
kubeadmutil.CheckErr(fmt.Errorf("The --config flag is mandatory"))
|
||||
}
|
||||
|
||||
err := RunKubeletWriteEnvFile(cfgPath)
|
||||
kubeadmutil.CheckErr(err)
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user