File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
internal/cmd/argus/scrape-config/create Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -77,14 +77,6 @@ func NewCmd(p *print.Printer) *cobra.Command {
7777 instanceLabel = model .InstanceId
7878 }
7979
80- if ! model .AssumeYes {
81- prompt := fmt .Sprintf ("Are you sure you want to create scrape configuration %q on Argus instance %q?" , * model .Payload .JobName , instanceLabel )
82- err = p .PromptForConfirmation (prompt )
83- if err != nil {
84- return err
85- }
86- }
87-
8880 // Fill in default payload, if needed
8981 if model .Payload == nil {
9082 defaultPayload := argusUtils .DefaultCreateScrapeConfigPayload
@@ -94,6 +86,14 @@ func NewCmd(p *print.Printer) *cobra.Command {
9486 model .Payload = & defaultPayload
9587 }
9688
89+ if ! model .AssumeYes {
90+ prompt := fmt .Sprintf ("Are you sure you want to create scrape configuration %q on Argus instance %q?" , * model .Payload .JobName , instanceLabel )
91+ err = p .PromptForConfirmation (prompt )
92+ if err != nil {
93+ return err
94+ }
95+ }
96+
9797 // Call API
9898 req := buildRequest (ctx , model , apiClient )
9999 _ , err = req .Execute ()
You can’t perform that action at this time.
0 commit comments