diff --git a/cli/record/remove.go b/cli/record/remove.go index a0bcc905..5c989cf8 100644 --- a/cli/record/remove.go +++ b/cli/record/remove.go @@ -105,17 +105,19 @@ You may also invoke this command in "wizard" mode and be prompted for input table.Render() - response := false - prompt := &survey.Confirm{ - Message: "continue with record deletion?", - } + if !internal.NoInput { + response := false + prompt := &survey.Confirm{ + Message: "continue with record deletion?", + } - if err := survey.AskOne(prompt, &response); err != nil { - return err - } + if err := survey.AskOne(prompt, &response); err != nil { + return err + } - if !response { - logrus.Fatal("exiting as requested") + if !response { + logrus.Fatal("exiting as requested") + } } _, err = provider.DeleteRecords(c.Context, zone, []libdns.Record{toDelete})