1

Using the gradle node plugin com.github.node-gradle.node, how do I pass a command line option to the NpmInstallTask?

Background: For security reasons, I want to pass "--ignore-scripts".

Matthias Simon
  • 388
  • 5
  • 13

2 Answers2

0

The npmCommand in NpmInstallTask inherited from NpmTask is a listProperty

If you set that to ["install", "--ignore-scripts"] it should be correctly passed

deepy
  • 473
  • 4
  • 20
0

You can use following snippet (as documented here):

npmInstall.args = ['--ignore-scripts']
LoganMzz
  • 1,597
  • 3
  • 18
  • 31