Return an exit code for RunTargetsWithoutExiting
See original GitHub issueUse case(s)
I want to be able to run some (cleanup) code after running the targets regardless of success/failure and still exit with the appropriate exit code
Description
Example:
var exitCode = RunTargetsWithoutExiting(args);
StopContainers();
return exitCode; // or Environment.Exit(exitCode);
Alternatives
I have none.
Additional context
NA
Issue Analytics
- State:
- Created 3 years ago
- Comments:14 (14 by maintainers)
Top Results From Across the Web
bash - Return an exit code without closing shell
The true command is never executed but is used to build a compound command that is not exited by the -e shell flag....
Read more >nx exiting with code 0 in CI without executing target #2219
When I run this locally, it executes as I would expect. When I execute this via AWS CodeBuild the child process executing the...
Read more >Process Exit Codes in Python
You can set an exit code for a process via sys.exit() and retrieve the exit code via the exitcode attribute on the multiprocessing....
Read more >Set app exit code
My client runs some checks on the target application, and if these fail,. I want to have drrun exit with a non-zero code....
Read more >Thread: pg_rewind exiting with error code 1 when source and ...
Hi all, I have been pinged internally by a user by the fact that pg_rewind returns 1 as exit code if the target...
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

BTW I can see why this might start to feel a bit messy, so now I find myself considering this again:
Reasonable, and thanks for the discussion 😉