Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exit code is 0 when converge plan has errors #492

Closed
ryane opened this issue Nov 10, 2016 · 0 comments · Fixed by #525
Closed

exit code is 0 when converge plan has errors #492

ryane opened this issue Nov 10, 2016 · 0 comments · Fixed by #525
Assignees
Labels
Milestone

Comments

@ryane
Copy link
Contributor

ryane commented Nov 10, 2016

If running converge plan results in errors, the exit code from the process should be zon-zero:

$ ./converge plan --local samples/fileMode.hcl
2016-11-10T13:38:01-05:00 |INFO| serving        addr=:47740 component=rpc
2016-11-10T13:38:01-05:00 |WARN| skipping module verification   component=client
2016-11-10T13:38:01-05:00 |INFO| got status     component=client file=samples/fileMode.hcl id=root/param.filename run=STARTED stage=PLAN
2016-11-10T13:38:01-05:00 |INFO| got status     component=client file=samples/fileMode.hcl id=root/file.mode.render run=STARTED stage=PLAN
2016-11-10T13:38:01-05:00 |INFO| got status     component=client file=samples/fileMode.hcl id=root/task.query.hostname run=STARTED stage=PLAN
2016-11-10T13:38:01-05:00 |INFO| got status     component=client file=samples/fileMode.hcl id=root run=STARTED stage=PLAN

root/task.query.hostname:
 Error: error in dependency "root/file.mode.render"
 Messages:
 Has Changes: yes
 Changes: No changes

root/file.mode.render:
 Error: cannot set mode for file that does not exist
 Messages:
  "test.txt" does not exist
 Has Changes: yes
 Changes:
  test.txt: "----------" => "-r-x--x--x"

Summary: 3 errors, 3 changes

 * root/file.mode.render: cannot set mode for file that does not exist
 * root/task.query.hostname: error in dependency "root/file.mode.render"
 * root: error in dependency "root/task.query.hostname"

$ echo $?
0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant