feat(cli-hooks): exit the start process with the subprocess exit code#2153
feat(cli-hooks): exit the start process with the subprocess exit code#2153
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2153 +/- ##
=======================================
Coverage 91.94% 91.94%
=======================================
Files 38 38
Lines 10328 10328
Branches 652 652
=======================================
Hits 9496 9496
Misses 820 820
Partials 12 12
Flags with carried forward coverage won't be shown. Click here to find out more. |
|
@mwbrooks Thanks a ton! I'm hoping to merge this soon and am investigating another hook change around running certain scripts within project directories. That might require changes to other hook implementations so I'm unsure if it makes sense to wait on that change before the next release - I'll follow up in a bit! 🤔 |
|
Ahh... It appears that more changes in different places are needed to read the For now I'll merge this and will begin follow ups for a following release. |
Summary
This PR uses
process.exitto exit the "start" hook with the exit code matching the provided script 👾Preview
exit.mov
Reviewers
Testing this requires a development CLI build that avoids overwriting these exit codes as well!
Recommended
starthook cases to test might include:exit 2! Use a custom error codesleep 12! Interrupt a waiting processNotes
IIRC the
console.logthat was removed was used as a shortcut for exiting as expected! This is removed which might cause confusion in CLI versions v2.33.0 or earlier since the process hangs intead of exits... Fixes are following in the development build!Requirements