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

Return value to shell on errors is not always set. #219

Open
ecraven opened this issue Feb 5, 2021 · 0 comments
Open

Return value to shell on errors is not always set. #219

ecraven opened this issue Feb 5, 2021 · 0 comments

Comments

@ecraven
Copy link

ecraven commented Feb 5, 2021

Playing around with huskc/huski I noticed that when an error occurs, the return value to the shell is still sometimes 0, so it isn't possible to reliably detect errors.
Example code to trigger this:

(import (scheme base))
(define (assert x) (unless x (error "ERROR assertion failed")))
(assert (equal? '#1=(a b . #1#) '#2= (a b a b . #2#)))

or

(import (scheme base) (scheme list))
(define (assert x) (unless x (error "ERROR assertion failed")))
(assert (equal? 1 1))

run with huski /tmp/test.scm, this produces error output as follows, but doesn't actually set the return value to anything other than 0:

Parse error at : "lisp" (line 3, column 19):
unexpected "1"

or

Error: File does not exist: scheme/list.sld

All the error messages are different, so there is no way to check for that either :-/

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

No branches or pull requests

1 participant