Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Processes that run out of memory report exit code 0 #60

Closed
papermana opened this issue Nov 23, 2021 · 0 comments · Fixed by #61
Closed

Processes that run out of memory report exit code 0 #60

papermana opened this issue Nov 23, 2021 · 0 comments · Fixed by #61

Comments

@papermana
Copy link
Contributor

If I have a command that ends up running out of memory, it should return code 134 (on Unix, at least). But instead, when used with dotenv-cli, the code is 0. This creates issues in CI environments. For example, a test suite that runs out of memory counts as passing.

To reproduce, create a file test.js with these contents:

const arr = [];

for (let i = 0; i < 10_000_000_000; i++) {
  arr.push(i);
}

And then run this in your terminal:

node --max-old-space-size=1024 test.js
echo $? // 134
node_modules/.bin/dotenv -c test node --max-old-space-size=1024 test.js
echo $? // 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant