Closed jason5122 closed 3 years ago
It works for me. Try
echo "{" | asy - || echo error
echo "{}" | asy - || echo error
Here is what I get:
This isn't right, is it? echo error
is not reached in either case.
It looks like you are maybe running under MacOS? Can you please confirm what OS you are using. This is an important detail.
Yes, I am on macOS 11.1.
@johncbowman I can't seem to reproduce this on macOS 11.0, running on M1 with ARM architecture.
I can reproduce the problem on a MacBook Pro under Big Sur (Darwin Kernel Version 20.1.0). It looks like an OS issue; maybe there is an OS patch to fix error code handling?
Followup: it seems to be a multithreading issue as this correctly generates ERROR: echo "{" | asy - -nothreads || echo ERROR
Fixed in commit 76702591d248278c20260206bd1d8f6bff27993a.
Hi, I've installed Asymptote 2.70 from
brew
. When I use it and an error occurs, no appropriate exit code is raised. For example,error: unexpected end of input
orerror: could not load module
exits with code 0.Is this even normal? Is there a way I can know when an error has occurred programmatically? Thanks for reading.