turbo
02fdccd6 - fix: ignore exit codes when child killed by manager (#6767)

Commit
2 years ago
fix: ignore exit codes when child killed by manager (#6767) ### Description Fixes https://github.com/vercel/turbo/issues/6754 As of `pnpm@8.10.0` `pnpm run script` will respond to a `SIGINT` with an exit code of `0` (See https://github.com/pnpm/npm-lifecycle/pull/41). `turbo` would see this exit code and assume the task successfully completed which results in unwanted behavior on our part. In Go we don't run into this issue as we [lock the stop channel during shutdown](https://github.com/vercel/turbo/blob/main/cli/internal/process/child.go#L205) and then [will fail this check once the lock is released](https://github.com/vercel/turbo/blob/main/cli/internal/process/child.go#L251) meaning that we would never send the underlying exit code to the exit channel. Huge thanks to @laat for reporting the bug with a paired down reproduction repo and for finding the underlying PR that changed `pnpm`'s behavior. ### Testing Instructions Updating existing unit tests to check that we get a `ChildExit::Killed` instead of the underlying process exit code. Closes TURBO-1893 Co-authored-by: Chris Olszewski <Chris Olszewski>
Parents
Loading