Run command parameters aren't forwarded to destination script
Braynid opened this issue · 2 comments
I have the following command in package.json
-> "dev": "nodejs-dashboard node bin/server.js --env development"
The issue is that --env development
doesn't get forwarded to server.js
.
I've tested and the issue is that commander
strips it and only keeps the command itself.
I'll try and provide a PR if I find the time!
LE: I know you can use "dev": "nodejs-dashboard -- node bin/server.js --env development"
but I think it would be nice if it worked directly.
It's very likely going to remain that you will need '--' because without it the dashboard itself will collide with flags which gives us a very complicated future development strategy.
'--' is the time honored and well accepted way of having one process invoke a child process with all of its flags and glory . 🙂
Right now they're just ignored so I imagine they could be just captured and forwarded.
But you're right, using --
is the true and trusted way of doing it.