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

Vangen exits with status 0 when there is a syntax error #14

Closed
hillna opened this issue Jun 28, 2022 · 3 comments · Fixed by #15
Closed

Vangen exits with status 0 when there is a syntax error #14

hillna opened this issue Jun 28, 2022 · 3 comments · Fixed by #15
Milestone

Comments

@hillna
Copy link

hillna commented Jun 28, 2022

When there is a syntax error in the vangen.json file, vangen will output the error and then exit with status 0.

> go run 4d63.com/vangen
 invalid character ']' looking for beginning of value
> echo $?
 0

We have a pipeline that utilizes vangen which will still pass as successful when vangen fails.

Executable should exit with status 1 when there is a syntax error in the configuration.

@leighmcculloch
Copy link
Owner

Good catch. This should definitely be causing a non-zero exit status. It looks like there are a few error conditions where this is happening in the application.

chrsm added a commit to chrsm/vangen that referenced this issue Jun 29, 2022
@chrsm
Copy link
Contributor

chrsm commented Jun 29, 2022

Hi @leighmcculloch - I added pr#15 to address this - as well as other error cases where main would return after printing an error. Let me know if this is inline with your style/etc; I am happy to make any changes you'd like.

chrsm added a commit to chrsm/vangen that referenced this issue Jul 3, 2022
@leighmcculloch leighmcculloch linked a pull request Jul 3, 2022 that will close this issue
@leighmcculloch leighmcculloch added this to the v1.3.0 milestone Jul 3, 2022
@leighmcculloch
Copy link
Owner

The fix created by @chrsm is released in v1.3.0.

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

Successfully merging a pull request may close this issue.

3 participants