gradle-node-plugin icon indicating copy to clipboard operation
gradle-node-plugin copied to clipboard

Unable to pass multiple argument in npm script

Open abhishek153 opened this issue 7 years ago • 3 comments

I have npm run task defined in package.json script as below

"e2e-remoteServer": "protractor ./protractor.conf.js",

using it in my gradle task as:

task npmRunTest(type: NpmTask) { args = ['run','e2e-remote'] }

I want to pass multiple arguments to run task : --baseUrl="http://localhost:8080/, --browser="firebox"

How can i achieve this using this plugin. I tried multiple option as args = ['run','e2e-remote', ''arg1, 'arg2'] but it seems to simply ignoring the other args. I am unable to run npm scripts similar to above.

Please help how I can achieve this?

Thanks, Abhishek

abhishek153 avatar Aug 01 '18 15:08 abhishek153

Did you try args=['run', 'e2e-remote', '--baseUrl="http://localhost:8080/', '--browser="firebox"']?

david-hm avatar Jul 31 '19 16:07 david-hm

Maybe try args=['run', 'e2e-remote', '--', '--baseUrl="http://localhost:8080/', '--browser="firebox"'] (note the --)

thSoft avatar Oct 13 '20 20:10 thSoft

I don't think this is an issue with the plugin, it seems to be specific for npm. The plugin just sends the arguments, if npm ignores them it won't matter what you send

deepy avatar Oct 14 '20 07:10 deepy