Fix swallowed errors in command package.
This commit is contained in:
parent
a12daf5aba
commit
8501d83e6c
|
@ -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…
Reference in New Issue