fix: always check for deployed status when removing
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
You can't delete regardless of -f if an app is deployed, the runtime will error out. Best just deal with this for all cases then on our side.
This commit is contained in:
parent
763e7b5bff
commit
b61b8f0d2a
|
@ -54,14 +54,12 @@ var appRemoveCommand = &cli.Command{
|
||||||
logrus.Fatal(err)
|
logrus.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if !internal.Force {
|
isDeployed, _, err := stack.IsDeployed(c.Context, cl, app.StackName())
|
||||||
isDeployed, _, err := stack.IsDeployed(c.Context, cl, app.StackName())
|
if err != nil {
|
||||||
if err != nil {
|
logrus.Fatal(err)
|
||||||
logrus.Fatal(err)
|
}
|
||||||
}
|
if isDeployed {
|
||||||
if isDeployed {
|
logrus.Fatalf("%s is still deployed. Run \"abra app undeploy %s \" or pass --force", app.Name, app.Name)
|
||||||
logrus.Fatalf("%s is still deployed. Run \"abra app undeploy %s \" or pass --force", app.Name, app.Name)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fs := filters.NewArgs()
|
fs := filters.NewArgs()
|
||||||
|
@ -81,6 +79,7 @@ var appRemoveCommand = &cli.Command{
|
||||||
|
|
||||||
if len(secrets) > 0 {
|
if len(secrets) > 0 {
|
||||||
var secretNamesToRemove []string
|
var secretNamesToRemove []string
|
||||||
|
|
||||||
if !internal.Force {
|
if !internal.Force {
|
||||||
secretsPrompt := &survey.MultiSelect{
|
secretsPrompt := &survey.MultiSelect{
|
||||||
Message: "which secrets do you want to remove?",
|
Message: "which secrets do you want to remove?",
|
||||||
|
|
Loading…
Reference in New Issue