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

Cannot pass arguments with spaces in NODE_OPTIONS #21575

Closed
mafintosh opened this issue Jun 28, 2018 · 2 comments
Closed

Cannot pass arguments with spaces in NODE_OPTIONS #21575

mafintosh opened this issue Jun 28, 2018 · 2 comments
Labels
cli Issues and PRs related to the Node.js command line interface. duplicate Issues and PRs that are duplicates of other issues or PRs.

Comments

@mafintosh
Copy link
Member

  • Version: 10.5.0
  • Platform: Linux
  • Subsystem:

When using the NODE_OPTIONS env there is no way to quote arguments passed. This is problematic if you pass flags like -r where the path passed might have spaces in them.

To reproduce try saving this file as ./test case.js

console.log('hi')

Running node -r './test case.js' node prints hi, but running NODE_OPTIONS="-r './test case.js'" node results in an error.

@vsemozhetbyt vsemozhetbyt added the cli Issues and PRs related to the Node.js command line interface. label Jun 28, 2018
@mcollina
Copy link
Member

This also happens on node 8.11.3.

@richardlau richardlau added the duplicate Issues and PRs that are duplicates of other issues or PRs. label Jun 28, 2018
@richardlau
Copy link
Member

This is a duplicate of #12971.

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. duplicate Issues and PRs that are duplicates of other issues or PRs.
Projects
None yet
Development

No branches or pull requests

4 participants