srs / gradle-node-plugin

Gradle plugin for integrating NodeJS in your build. :rocket:
Apache License 2.0
867 stars 210 forks source link

Add node.CurrentExe property to NodeExtension.groovy #342

Open aky100200 opened 5 years ago

aky100200 commented 5 years ago

In a Windows environment where node is not installed When I execute bower-license from the gradle task of type: Exec , the following error appears.

…

+ bower-license@0.4.4
added 23 packages from 14 contributors and audited 30109 packages in 19.554s
found 1138 vulnerabilities (632 low, 493 moderate, 13 high)
  run `npm audit fix` to fix them, or `npm audit` for details
:npm_run_bower_license'node' は、内部コマンドまたは外部コマンド、
操作可能なプログラムまたはバッチ ファイルとして認識されていません。
 FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':npm_run_bower_license'.
> Process 'command 'cmd'' finished with non-zero exit value 1

…

The cause was that path did not pass. I added "node.workDir + (version directory path of node)" and ran successfully. I created a script to find a match for node.version under the path of node.workDir.

Propose to add a new property to NodeExtension.groovy.