Commit de4921ad authored by GuessWhoSamFoo's avatar GuessWhoSamFoo
Browse files

Check if environment exists before removing

Signed-off-by: default avatarGuessWhoSamFoo <>
parent d3e2d4ce
......@@ -216,6 +216,10 @@ func (a *App010) RemoveEnvironment(envName string, override bool) error {
return errors.Wrap(err, "load configuration")
if _, ok := a.config.Environments[envName]; !ok {
return errors.Errorf("environment %q does not exist", envName)
if override {
delete(a.overrides.Environments, envName)
} else {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment