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

--redirect-warnings option appears to be broken #18580

Closed
silverwind opened this issue Feb 5, 2018 · 3 comments
Closed

--redirect-warnings option appears to be broken #18580

silverwind opened this issue Feb 5, 2018 · 3 comments
Labels
lib / src Issues and PRs related to general changes in the lib or src directory.

Comments

@silverwind
Copy link
Contributor

  • Version: 9.5.0
  • Platform: macOS 10.13.3
  • Subsystem: src

I tried various invocations but none seem to really work:

node −−redirect−warnings=file -p 'GLOBAL.foo = 1'      # Error: Cannot find module
node -p 'GLOBAL.foo = 1' −−redirect−warnings=file      # No error, no file written
@silverwind silverwind added the lib / src Issues and PRs related to general changes in the lib or src directory. label Feb 5, 2018
@daynin
Copy link
Contributor

daynin commented Feb 7, 2018

@silverwind hi!

A minus sign in your commands is http://www.codetable.net/decimal/8722, but a minus sing from docs (and standard keyboard as well) is http://www.codetable.net/decimal/45.

If you try to execute these commands:

node --redirect-warnings=file -p 'GLOBAL.foo = 1'      # ok
node -p 'GLOBAL.foo = 1' --redirect-warnings=file      # ok

You'll get no errors. But if you'll try to execute this:

node −−help

You'll get the same error as in your case:

Error: Cannot find module '/Users/daynin/−−help'
    at Function.Module._resolveFilename (module.js:536:15)
    at Function.Module._load (module.js:466:25)
    at Function.Module.runMain (module.js:676:10)
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:608:3

Other command line tools cannot parse this minus sign as well

@silverwind
Copy link
Contributor Author

Indeed you're right. I have no idea how I was even able to write the unicode symbol. Sorry for the noise.

@silverwind
Copy link
Contributor Author

Ah, I remember: I copied it out of the HMTL mentioned in #18559 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lib / src Issues and PRs related to general changes in the lib or src directory.
Projects
None yet
Development

No branches or pull requests

2 participants