Skip to content

Comments

Ensure that using the -v or -h flags always returns with EXIT_SUCCESS#255

Merged
zhaozg merged 1 commit intoluvit:masterfrom
LuvitPlayground:fix-cli-return-code
Oct 22, 2021
Merged

Ensure that using the -v or -h flags always returns with EXIT_SUCCESS#255
zhaozg merged 1 commit intoluvit:masterfrom
LuvitPlayground:fix-cli-return-code

Conversation

@rdw-software
Copy link
Contributor

@rdw-software rdw-software commented Oct 21, 2021

Returning -1 indicates an error, assuming the usual convention for exit codes is followed. Seeing how main.c returns -1 in case of errors, this appears to be the case. Edit: It seems to turn into 255 on my Ubuntu system, but that's still interpreted as an error.

Specifically, using either of the two flags in a script or CI workflow will cause it to mistakenly assume an error has occured and fail as a result. I've found this out when I was using -v in a workflow (for debugging purposes) and it failed the entire run.

Returning -1 indicates an error, assuming the usual convention for exit codes is followed. Seeing how main.c returns -1 in case of errors, this appears to be the case.

Specifically, using either of the two flags in a script or CI workflow will cause it to mistakenly assume an error has occured and fail as a result.
@zhaozg zhaozg merged commit 91e06ee into luvit:master Oct 22, 2021
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 this pull request may close these issues.

3 participants