From 8501d83e6c3070836bf5e56bd2f40c94d9e44598 Mon Sep 17 00:00:00 2001 From: Lars Lehtonen Date: Tue, 11 Jul 2017 08:01:02 -0700 Subject: [PATCH] Fix swallowed errors in command package. --- command/plugins_test.go | 3 +++ command/workspace_new.go | 3 +++ 2 files changed, 6 insertions(+) diff --git a/command/plugins_test.go b/command/plugins_test.go index e0cd13c5bd..7c7200ae5a 100644 --- a/command/plugins_test.go +++ b/command/plugins_test.go @@ -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)() diff --git a/command/workspace_new.go b/command/workspace_new.go index 53a873030a..88dc27da92 100644 --- a/command/workspace_new.go +++ b/command/workspace_new.go @@ -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))