fix: add missing error handling
This commit is contained in:
parent
16e844643a
commit
a18a9493f2
|
@ -44,7 +44,9 @@ var appRemoveCommand = &cli.Command{
|
||||||
prompt := &survey.Confirm{
|
prompt := &survey.Confirm{
|
||||||
Message: fmt.Sprintf("About to delete %s, are you sure", appName),
|
Message: fmt.Sprintf("About to delete %s, are you sure", appName),
|
||||||
}
|
}
|
||||||
survey.AskOne(prompt, &response)
|
if err := survey.AskOne(prompt, &response); err != nil {
|
||||||
|
logrus.Fatal(err)
|
||||||
|
}
|
||||||
if !response {
|
if !response {
|
||||||
return errors.New("User aborted app removal")
|
return errors.New("User aborted app removal")
|
||||||
}
|
}
|
||||||
|
@ -91,7 +93,9 @@ var appRemoveCommand = &cli.Command{
|
||||||
Options: secretNames,
|
Options: secretNames,
|
||||||
Default: secretNames,
|
Default: secretNames,
|
||||||
}
|
}
|
||||||
survey.AskOne(secretsPrompt, &secretNamesToRemove)
|
if err := survey.AskOne(secretsPrompt, &secretNamesToRemove); err != nil {
|
||||||
|
logrus.Fatal(err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, name := range secretNamesToRemove {
|
for _, name := range secretNamesToRemove {
|
||||||
|
@ -125,7 +129,9 @@ var appRemoveCommand = &cli.Command{
|
||||||
Options: vols,
|
Options: vols,
|
||||||
Default: vols,
|
Default: vols,
|
||||||
}
|
}
|
||||||
survey.AskOne(volumesPrompt, &removeVols)
|
if err := survey.AskOne(volumesPrompt, &removeVols); err != nil {
|
||||||
|
logrus.Fatal(err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
for _, vol := range removeVols {
|
for _, vol := range removeVols {
|
||||||
err := cl.VolumeRemove(ctx, vol, internal.Force) // last argument is for force removing
|
err := cl.VolumeRemove(ctx, vol, internal.Force) // last argument is for force removing
|
||||||
|
|
Loading…
Reference in New Issue