Description
I would like to use local nodeJS, that is downloaded into project dir using https://github.com/node-gradle/gradle-node-plugin. I tried to specify npm executable using using prettier().npmExecutable('<path to project>/.gradle/nodejs/node-v16.18.0-linux-x64/bin/npm')
. But it still expects node command to be present. So the only way to set it up for me was to override PATH using command line like PATH=/<path to project>/.gradle/nodejs/node-v16.18.0-linux-x64/bin:$PATH ./gradlew
.
But it seems that we could do it by overriding PATH variable using java.lang.ProcessBuilder#environment()
in com.diffplug.spotless.npm.NpmProcess#npm
. So, I think it would be helpful to be able to set up node bin directory in settings, so it can be then added into PATH environment variable for the process.