File tree Expand file tree Collapse file tree 3 files changed +13
-18
lines changed
internal/cmd/beta/cdn/distribution Expand file tree Collapse file tree 3 files changed +13
-18
lines changed Original file line number Diff line number Diff line change @@ -144,12 +144,10 @@ func NewCmd(params *types.CmdParams) *cobra.Command {
144144 projectLabel = model .ProjectId
145145 }
146146
147- if ! model .AssumeYes {
148- prompt := fmt .Sprintf ("Are you sure you want to create a CDN distribution for project %q?" , projectLabel )
149- err = params .Printer .PromptForConfirmation (prompt )
150- if err != nil {
151- return err
152- }
147+ prompt := fmt .Sprintf ("Are you sure you want to create a CDN distribution for project %q?" , projectLabel )
148+ err = params .Printer .PromptForConfirmation (prompt )
149+ if err != nil {
150+ return err
153151 }
154152
155153 req := buildRequest (ctx , model , apiClient )
Original file line number Diff line number Diff line change @@ -54,12 +54,10 @@ func NewCmd(params *types.CmdParams) *cobra.Command {
5454 projectLabel = model .ProjectId
5555 }
5656
57- if ! model .AssumeYes {
58- prompt := fmt .Sprintf ("Are you sure you want to delete the CDN distribution %q for project %q?" , model .DistributionID , projectLabel )
59- err = params .Printer .PromptForConfirmation (prompt )
60- if err != nil {
61- return err
62- }
57+ prompt := fmt .Sprintf ("Are you sure you want to delete the CDN distribution %q for project %q?" , model .DistributionID , projectLabel )
58+ err = params .Printer .PromptForConfirmation (prompt )
59+ if err != nil {
60+ return err
6361 }
6462
6563 // Call API
Original file line number Diff line number Diff line change @@ -117,12 +117,11 @@ func NewCmd(params *types.CmdParams) *cobra.Command {
117117 params .Printer .Debug (print .ErrorLevel , "get project name: %v" , err )
118118 projectLabel = model .ProjectId
119119 }
120- if ! model .AssumeYes {
121- prompt := fmt .Sprintf ("Are you sure you want to update a CDN distribution for project %q?" , projectLabel )
122- err = params .Printer .PromptForConfirmation (prompt )
123- if err != nil {
124- return err
125- }
120+
121+ prompt := fmt .Sprintf ("Are you sure you want to update a CDN distribution for project %q?" , projectLabel )
122+ err = params .Printer .PromptForConfirmation (prompt )
123+ if err != nil {
124+ return err
126125 }
127126
128127 req := buildRequest (ctx , apiClient , model )
You can’t perform that action at this time.
0 commit comments