Skip to content
This repository has been archived by the owner on Jan 6, 2021. It is now read-only.

fixes #150 exit code when os kills child process #177

Merged
merged 2 commits into from
May 9, 2018

Conversation

bithavoc
Copy link
Contributor

@bithavoc bithavoc commented May 9, 2018

What:

Solves #150

Why:

Ran into this issue when Circle-CI 2.0 runs out of memory, cross-env still reports the child process to exit with 0(success) when it was killed by the OS via SIGTERM.

How:

Keeping track of exit status of childProcess.on('exit'), when exit code is null then the process was killed but null shouldn't be passed to cross-env's process.exit since the null argument is interpreted as zero.

Checklist:

  • Documentation
  • Tests
  • Ready to be merged
  • Added myself to contributors table

@codecov
Copy link

codecov bot commented May 9, 2018

Codecov Report

Merging #177 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #177   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           3      3           
  Lines          64     65    +1     
  Branches       15     16    +1     
=====================================
+ Hits           64     65    +1
Impacted Files Coverage Δ
src/index.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 450dae9...9515bf4. Read the comment docs.

Copy link
Owner

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thanks @bithavoc!

@kentcdodds kentcdodds merged commit d5170bf into kentcdodds:master May 9, 2018
@kentcdodds
Copy link
Owner

This has been published as cross-env@5.1.5 👍

This was referenced Sep 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants