-
Notifications
You must be signed in to change notification settings - Fork 33
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
Luaver kill the whole batch process on error #29
Comments
Can you elaborate on the issue. I see it is a problem but exactly how is it affecting the CI? |
(I am sorry but I cannot fully understand why tl;dr Of course, the current luaver is working when there are no errors. For example, travis_retry won't work as expected. install: for i in 1 2 3; do luaver install 5.3.2; done
# essentially equivalent to `travis_retry luaver install 5.3.2` However, this will never work as expected because luaver kills the ongoing shell process on error, which cause the loop to stop. |
The behavior of bash$ kill -INT $$
$ echo $?
1 zsh% kill -INT $$
% echo $?
0 dash
ksh
|
I get your point. This is indeed a minor yet important bug. An alternate way needs to be found out. I'm ignoring this for the present release though. |
Exit code is used to handle errors instead of signal. Fixes DhavalKapil#29
Exit code is used to handle errors instead of signal. Fixes DhavalKapil#29
Exit code is used to handle errors instead of signal. Fixes DhavalKapil#29
Exit code is used to handle errors instead of signal. Fixes DhavalKapil#29
Exit code is used to handle errors instead of signal. Fixes DhavalKapil#29
The following script will not work as expected:
The result was:
$ sh test.sh No lua version set $
while printing
Something wrong
is the expected behavior.This is caused by luaver#L34, which kills not only the
luaver
function but also the whole batch process.This behavior makes difficult to use luaver on the CI.
Since there is no exception handling mechanism on shells (
kill -INT $$
is appearently not working), I suggest each command has explicit error handling using&&
andif
.The text was updated successfully, but these errors were encountered: