You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran into this, too and found a solution. env-cmd uses the package commander for its CLI functionality, including support for version, usage and options. That package supports grouping multiple single-letter options into one option parameter. For example, it is interpreting -abcv to be the same as -a -b -c -v. The option -v corresponds to printing the version. The implementation of version just happens to short-circuit any other processing, so if any of the options it sees includes a v, you will get the version number printed out and no other functionality.
The solution is to include -- (documented here) at the right place to tell env-cmd (and commander under the hood) to stop processing further options. Here is a simplified example from my package.json where I was only getting the version number displayed because the v in -derivedDataPath was triggering commander's version handler:
Node 12.16.3
env-cmd 10.1.0
Output: 10.1.0
Expected output: 12.16.3
If I comment out this line in my node_modules, then it works as expected:
https://github.com/toddbluhm/env-cmd/blob/master/dist/parse-args.js#L77
I don't know enough about commander to propose a fix.
The text was updated successfully, but these errors were encountered: