[Gradle, JS] Node into PATH during installing of dependencies

^KT-37895 fixed
This commit is contained in:
Ilya Goncharov
2021-07-01 16:26:10 +03:00
committed by TeamCityServer
parent 065a5d98fb
commit e2adf9793c
@@ -39,11 +39,17 @@ abstract class YarnBasics : NpmApi {
val arguments = args +
if (logger.isDebugEnabled) "--verbose" else ""
val nodeExecutable = nodeJs.requireConfigured().nodeExecutable
exec.environment(
"PATH",
"$nodeExecutable${File.pathSeparator}${System.getenv("PATH")}"
)
if (isStandalone) {
exec.executable = command
exec.args = arguments
} else {
exec.executable = nodeJs.requireConfigured().nodeExecutable
exec.executable = nodeExecutable
exec.args = listOf(command) + arguments
}