Merge pull request #57322 from niuzhenguo/dry-run-flag-cleanup
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Use GetDryRunFlag to keep consistent **What this PR does / why we need it**: There's a cmd util GetDryRunFlag, but we still get 'dry-run' directly somewhere. This PR makes them consistent. **Release note**: ```release-note NONE ```
This commit is contained in:
@@ -183,7 +183,7 @@ func (o *CreateOptions) RunCreate(f cmdutil.Factory, cmd *cobra.Command) error {
|
||||
return err
|
||||
}
|
||||
|
||||
dryRun := cmdutil.GetFlagBool(cmd, "dry-run")
|
||||
dryRun := cmdutil.GetDryRunFlag(cmd)
|
||||
output := cmdutil.GetFlagString(cmd, "output")
|
||||
mapper := r.Mapper().RESTMapper
|
||||
|
||||
|
Reference in New Issue
Block a user