This repository was archived by the owner on Aug 18, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -256,7 +256,7 @@ class BuildUtility(logger: ManagedLogger) {
256
256
257
257
logger info " Installing GUI dependencies."
258
258
259
- val exitCode = new ProcessBuilder (" npm " , " install" )
259
+ val exitCode = new ProcessBuilder (getNpmCommand :+ " install" : _* )
260
260
.inheritIO()
261
261
.directory(guiDir)
262
262
.start()
@@ -293,7 +293,7 @@ class BuildUtility(logger: ManagedLogger) {
293
293
294
294
logger info " Building GUI."
295
295
296
- val buildExitCode = new ProcessBuilder (" npm " , " run" , " build" )
296
+ val buildExitCode = new ProcessBuilder (getNpmCommand :+ " run" :+ " build" : _* )
297
297
.inheritIO()
298
298
.directory(guiDir)
299
299
.start()
@@ -316,6 +316,14 @@ class BuildUtility(logger: ManagedLogger) {
316
316
build(inputs).headOption
317
317
}
318
318
319
+ private def getNpmCommand : List [String ] = {
320
+ if (System .getProperty(" os.name" ).toLowerCase().contains(" win" )) {
321
+ List (" cmd.exe" , " /C" , " npm" )
322
+ } else {
323
+ List (" npm" )
324
+ }
325
+ }
326
+
319
327
/**
320
328
* Creates a file listing with all files including files in any sub-dir.
321
329
*
You can’t perform that action at this time.
0 commit comments