jc swallows exit codes
See original GitHub issueWhen running jc some_program
, even if some_program
exits with non-zero exit code, jc exits with zero:
$ jc ifconfig eth0
eth0: error fetching interface information: Device not found
[]
$ echo $?
0
Otherwise clean and straightforward integration with Next Generation Shell behaves incorrectly (with regard to errors) due to this issue.
``jc ...`` # should throw an exception but can't because exit code is 0
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Kelly Brazil on Twitter: "jc's "Magic" syntax no longer swallows exit ...
jc's "Magic" syntax no longer swallows exit codes. $ jc ifconfig foo ifconfig: interface foo does not exist [] $ echo $? 1...
Read more >Interpreting Joint Commission Standards: FAQs
Use this list of FAQs to interpret Joint Commission standards for specific areas.
Read more >J.C. Swallow Thesis - CERN Document Server
Joel C. Swallow. A thesis submitted to the University of Birmingham for the degree of Doctor Of Philosophy. Particle Physics Research Group.
Read more >podman-compose run swallows exit code · Issue #408 - GitHub
As far as I read the source code, that means that the run() method of Podman needs to sys.exit() if the podman command...
Read more >MBSImP™ Standardized Training And Reliability Testing #e01
Participants are tested on their newly acquired skill in using the MBSImP scoring metric to successfully capture and profile swallowing impairment in adults....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is now working on the
dev
branch. I added the following section to the Readme and man page:Exit Codes
Any fatal errors within
jc
will generate an exit code of100
, otherwise the exit code will be0
. When using the “magic” syntax (e.g.jc ifconfig eth0
),jc
will store the exit code of the program being parsed and add it to thejc
exit code. This way it is easier to determine if an error was from the parsed program orjc
.Consider the following examples using
ifconfig
:ifconfig
exit codejc
exit code0
0
0
1
0
1
ifconfig
0
100
100
jc
1
100
101
ifconfig
andjc
v1.15.4 is now available via pip and includes this functionality.