Skip to content

Commit

Permalink
more detail in unmarshal error
Browse files Browse the repository at this point in the history
  • Loading branch information
xchapter7x committed Oct 20, 2019
1 parent e550e9b commit 9fff49a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/commands/eval.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ func (s *EvalCommand) Execute(args []string) error {

err = yaml.Unmarshal(valuesFile, &valuesConfig)
if err != nil {
return fmt.Errorf("Unmarshal: %v", err)
return fmt.Errorf("Unmarshal %s failed: %v", valuesFile, err)
}

policyInput := make(map[string]interface{})
for fpath, template := range renderedOutput {
var config interface{}
err = yaml.Unmarshal([]byte(template), &config)
if err != nil {
return fmt.Errorf("Unmarshal: %v", err)
return fmt.Errorf("Unmarshal '%s' failed: %v", fpath, err)
}

policyInput[fpath] = config
Expand Down

0 comments on commit 9fff49a

Please sign in to comment.