Commit 3f2c7b6f authored by xiangpengzhao's avatar xiangpengzhao

Check config path for command "kubeadm alpha phase kubelet write-env-file"

parent 81c6b735
......@@ -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)
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment