Skip to content

Commit

Permalink
load: catch missing error
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianHicks committed Jun 9, 2016
1 parent 5eb3c68 commit 7f3d14e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ test: converge samples/*.hcl samples/errors/*.hcl
./converge fmt --check samples/*.hcl

samples/errors/*.hcl: converge
@echo === planning $@ should fail ===
./converge plan $@ || exit 0 && exit 1
@echo === validating $@ should fail ==
./converge validate $@ || exit 0 && exit 1

samples/%.png: samples/% converge
./converge graph $< | dot -Tpng -o$@
Expand Down
3 changes: 3 additions & 0 deletions load/load.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ func Load(source string, args resource.Values) (*Graph, error) {
err = graph.Walk(func(path string, res resource.Resource) error {
return res.Validate()
})
if err != nil {
return nil, err
}

return graph, nil
}
Expand Down

0 comments on commit 7f3d14e

Please sign in to comment.