Fix npm executable path resolution in build script
This commit is contained in:
parent
680506997e
commit
e6df93ff5c
|
|
@ -42,7 +42,7 @@ tasks.register("npmBuild") {
|
||||||
commandLine(npmCmd, "run", "build")
|
commandLine(npmCmd, "run", "build")
|
||||||
} else {
|
} else {
|
||||||
val npmExecutable = file(nodeDir).listFiles()?.find { it.name.startsWith("npm") && it.isDirectory }?.let {
|
val npmExecutable = file(nodeDir).listFiles()?.find { it.name.startsWith("npm") && it.isDirectory }?.let {
|
||||||
"${it.absolutePath}/npm"
|
"${it.absolutePath}/bin/npm/"
|
||||||
} ?: "$nodeDir/node_modules/npm/bin/npm"
|
} ?: "$nodeDir/node_modules/npm/bin/npm"
|
||||||
|
|
||||||
commandLine(npmExecutable, "run", "build")
|
commandLine(npmExecutable, "run", "build")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user