Fix swallowed errors in command package.

pull/15528/head
Lars Lehtonen 9 years ago
parent a12daf5aba
commit 8501d83e6c
No known key found for this signature in database
GPG Key ID: 8137D474EBCB04F2

@ -13,6 +13,9 @@ import (
func TestPluginPath(t *testing.T) {
td, err := ioutil.TempDir("", "tf")
if err != nil {
t.Fatal(err)
}
defer os.RemoveAll(td)
defer testChdir(t, td)()

@ -75,6 +75,9 @@ 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))
}
for _, s := range states {
if newEnv == s {
c.Ui.Error(fmt.Sprintf(envExists, newEnv))

Loading…
Cancel
Save