diff --git a/command/env_delete.go b/command/env_delete.go index 95b734d44..b573e57d5 100644 --- a/command/env_delete.go +++ b/command/env_delete.go @@ -99,9 +99,9 @@ func (c *EnvDeleteCommand) Run(args []string) int { return 1 } - empty := sMgr.State().Empty() + hasResources := sMgr.State().HasResources() - if !empty && !force { + if hasResources && !force { c.Ui.Error(fmt.Sprintf(envNotEmpty, delEnv)) return 1 } @@ -128,7 +128,7 @@ func (c *EnvDeleteCommand) Run(args []string) int { ), ) - if !empty { + if hasResources { c.Ui.Output( c.Colorize().Color( fmt.Sprintf(envWarnNotEmpty, delEnv),