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)
|
||||
}
|
||||
|
||||
if !internal.Force {
|
||||
isDeployed, _, err := stack.IsDeployed(c.Context, cl, app.StackName())
|
||||
if err != nil {
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
if isDeployed {
|
||||
logrus.Fatalf("%s is still deployed. Run \"abra app undeploy %s \" or pass --force", app.Name, app.Name)
|
||||
}
|
||||
isDeployed, _, err := stack.IsDeployed(c.Context, cl, app.StackName())
|
||||
if err != nil {
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
if isDeployed {
|
||||
logrus.Fatalf("%s is still deployed. Run \"abra app undeploy %s \" or pass --force", app.Name, app.Name)
|
||||
}
|
||||
|
||||
fs := filters.NewArgs()
|
||||
|
@ -81,6 +79,7 @@ var appRemoveCommand = &cli.Command{
|
|||
|
||||
if len(secrets) > 0 {
|
||||
var secretNamesToRemove []string
|
||||
|
||||
if !internal.Force {
|
||||
secretsPrompt := &survey.MultiSelect{
|
||||
Message: "which secrets do you want to remove?",
|
||||
|
|
Loading…
Reference in New Issue