Fix npm executable path resolution in build script

This commit is contained in:
Teriuihi 2025-04-19 00:08:13 +02:00
parent 680506997e
commit e6df93ff5c

View File

@ -42,7 +42,7 @@ tasks.register("npmBuild") {
commandLine(npmCmd, "run", "build")
} else {
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"
commandLine(npmExecutable, "run", "build")