mirror of
https://github.com/hashicorp/packer.git
synced 2026-06-10 17:20:26 -04:00
Merge pull request #9027 from alrs/fix-powershell-provisioner-err
provisioner/powershell: Test Error Improvements
This commit is contained in:
commit
e845632d3d
1 changed files with 4 additions and 1 deletions
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue