question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Node CLI options take precedence in latest Node v10

See original GitHub issue

Is this a BUG or a FEATURE REQUEST?:

A bug

What happened:

Passing CLI options to the executable was working fine in Node v8.9.4.

Since upgrading to Node v10.13.0, CLI options (--x) seem to be parsed with Node instead of being passed to the application.

What you expected to happen:

The application receiving the CLI options, not just arguments.

How to reproduce it (as minimally and precisely as possible):

$ echo "console.log(process.argv)" | nexe -t 8.9.4 -o test.exe && test.exe test
-> [ 'path\test.exe', '[stdin]', 'test' ]
$ echo "console.log(process.argv)" | nexe -t 8.9.4 -o test.exe && test.exe --test
-> [ 'path\test.exe', '[stdin]', '--test' ]

$ echo "console.log(process.argv)" | nexe -t 10.13.0 -o test.exe && test.exe test
-> [ 'path\test.exe', '[stdin]', 'test' ]
$ echo "console.log(process.argv)" | nexe -t 10.13.0 -o test.exe && test.exe --test
-> test.exe: bad option: --test

Anything else we need to know?:

Environment

  • Platform(OS/Version): Windows 10
  • Host Node Version: 10.13.0
  • Target Node Version: 8.9.4 and 10.13.0
  • Nexe version: 2.0.0-rc.34
  • Python Version: 2.7.15

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
calebboydcommented, Nov 21, 2018

They’re cooking, but the project on AppVeyor appears to be down… Unfortunately it triggers the other builds. Not sure when it will get going again. I’ve contacted their support team.

1reaction
calebboydcommented, Nov 21, 2018

They’re there!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Command-line API | Node.js v19.3.0 Documentation
Node.js comes with a variety of CLI options. ... Options from the command line take precedence over options passed through the NODE_OPTIONS environment ......
Read more >
nodejs-cli-apps-best-practices/README.md at main - GitHub
A collection of curated best practices on how to build successful, empathic and user-friendly Node.js Command Line Interface (CLI) applications. Why this guide?...
Read more >
Command line options
Node.js comes with a variety of CLI options. ... Options from the command line take precedence over options passed through the NODE_OPTIONS ...
Read more >
config | npm Docs
Description. npm gets its configuration values from the following sources, sorted by priority: Command Line Flags. Putting --foo bar on the command line...
Read more >
node.js - How can I set NODE_ENV=production on Windows?
Current versions of Windows use Powershell as the default shell, so use: $env:NODE_ENV="production". Per @jsalonen's answer below.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found