Return immediately after newly-added error condition

This commit is contained in:
Lars Lehtonen 2017-07-19 15:46:21 -07:00
parent 8501d83e6c
commit 119996b815
No known key found for this signature in database
GPG Key ID: 8137D474EBCB04F2

View File

@ -77,6 +77,7 @@ func (c *WorkspaceNewCommand) Run(args []string) int {
states, err := b.States()
if err != nil {
c.Ui.Error(fmt.Sprintf("Failed to get configured named states: %s", err))
return 1
}
for _, s := range states {
if newEnv == s {