From 49f28c9439f086bc9c53e88832eb8bbb1e8ef6f5 Mon Sep 17 00:00:00 2001 From: Lars Lehtonen Date: Wed, 8 Apr 2020 10:04:08 -0700 Subject: [PATCH] provisioner/powershell: fix dropped error provisioner/powershell: improve error message --- provisioner/powershell/provisioner_acc_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/provisioner/powershell/provisioner_acc_test.go b/provisioner/powershell/provisioner_acc_test.go index a6d075ae0..ad00bceff 100644 --- a/provisioner/powershell/provisioner_acc_test.go +++ b/provisioner/powershell/provisioner_acc_test.go @@ -44,11 +44,14 @@ func (s *PowershellProvisionerAccTest) GetConfig() (string, error) { filePath := filepath.Join("./test-fixtures", s.ConfigName) config, err := os.Open(filePath) if err != nil { - return "", fmt.Errorf("Expected to find %s", filePath) + return "", fmt.Errorf("os.Open:%v", err) } defer config.Close() file, err := ioutil.ReadAll(config) + if err != nil { + return "", fmt.Errorf("ioutil.ReadAll:%v", err) + } return string(file), nil }