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

Update --env-file documentation when a file cannot be found. #50734

Closed
wants to merge 1 commit into from

Conversation

arthurfiorette
Copy link

Node.js runs normally when the env file cannot be found. I think this behavior is good to be documented.

echo 'console.log(process.env)' > test.js;
echo 'A=1' > .env;

# does not prints A: '1'
node --env-file=not-found-env-file.env test.js;
node --env-file=not-found-env-file.env -e 'console.log(process.env)';

# prints A: '1'
node --env-file=.env test.js;
node --env-file=.env test.js -e 'console.log(process.env)';

@nodejs-github-bot nodejs-github-bot added cli Issues and PRs related to the Node.js command line interface. doc Issues and PRs related to the documentations. labels Nov 14, 2023
Copy link
Member

@anonrig anonrig left a comment

Choose a reason for hiding this comment

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

This doesn't apply anymore. Ref: #50588

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Issues and PRs related to the Node.js command line interface. doc Issues and PRs related to the documentations.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants