Use exit to pass exit code
See original GitHub issueWould it be possible to pass an exit code to the call to AppContext
’s exit
function? Then you’d get the value with const code = await app.waitUntilExit()
and verify it’s correct during testing.
I’d be willing to PR this.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Chapter 6. Exit and Exit Status
The exit command terminates a script, just as in a C program. · Every command returns an exit status (sometimes referred to as...
Read more >Understanding Exit Codes and Using them in Bash scripts
On Unix and Linux systems, programs can pass a value to their parent process while terminating. This value is referred to as an...
Read more >Linux and Unix exit code tutorial with examples - George Ornbo
To set an exit code in a script use exit 0 where 0 is the number you want to return. In the following...
Read more >Pass through exit status code after using - Unix Stack Exchange
Pass through exit status code after using || Show activity on this post. I want to do a different operation that has the...
Read more >Returning information from a shell script via an Exit Code
Exit codes are a number between 0 and 255, which is returned by any Unix command when it returns control to its parent...
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 Free
Top 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
Ink users can set
process.exitCode
themselves. We could document this as it’s not well-known.Yeah, to make it clear, I don’t want Ink to call process.exit itself. I do want to provide a way to signal the results of the CLI run, specifically in unit tests, that would allow me to bootstrap & run the app and assert against the results. The error-passing mechanism seems good and I can take a crack at that.