fix: handle noinput case
This commit is contained in:
parent
810bc27967
commit
94522178b1
|
@ -105,17 +105,19 @@ You may also invoke this command in "wizard" mode and be prompted for input
|
||||||
|
|
||||||
table.Render()
|
table.Render()
|
||||||
|
|
||||||
response := false
|
if !internal.NoInput {
|
||||||
prompt := &survey.Confirm{
|
response := false
|
||||||
Message: "continue with record deletion?",
|
prompt := &survey.Confirm{
|
||||||
}
|
Message: "continue with record deletion?",
|
||||||
|
}
|
||||||
|
|
||||||
if err := survey.AskOne(prompt, &response); err != nil {
|
if err := survey.AskOne(prompt, &response); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
if !response {
|
if !response {
|
||||||
logrus.Fatal("exiting as requested")
|
logrus.Fatal("exiting as requested")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_, err = provider.DeleteRecords(c.Context, zone, []libdns.Record{toDelete})
|
_, err = provider.DeleteRecords(c.Context, zone, []libdns.Record{toDelete})
|
||||||
|
|
Loading…
Reference in New Issue