mirror of
https://github.com/sbt/sbt.git
synced 2026-10-06 10:03:56 +02:00
Fix build so it works on Windows
This commit is contained in:
@@ -34,6 +34,7 @@ def buildLevelSettings: Seq[Setting[_]] =
|
||||
scmInfo := Some(ScmInfo(url("https://github.com/sbt/sbt"), "[email protected]:sbt/sbt.git")),
|
||||
resolvers += Resolver.mavenLocal,
|
||||
scalafmtOnCompile := true,
|
||||
scalafmtOnCompile in Sbt := false,
|
||||
scalafmtVersion := "1.3.0",
|
||||
))
|
||||
|
||||
@@ -463,10 +464,9 @@ lazy val sbtIgnoredProblems = {
|
||||
}
|
||||
|
||||
def runNpm(command: String, base: File, log: sbt.internal.util.ManagedLogger) = {
|
||||
val npm = if (sbt.internal.util.Util.isWindows) "npm.cmd" else "npm"
|
||||
import scala.sys.process._
|
||||
try {
|
||||
val exitCode = Process(s"$npm $command", Option(base)) ! log
|
||||
val exitCode = Process(s"npm $command", Option(base)) ! log
|
||||
if (exitCode != 0) throw new Exception("Process returned exit code: " + exitCode)
|
||||
} catch {
|
||||
case e: java.io.IOException => log.warn("failed to run npm " + e.getMessage)
|
||||
|
||||
Reference in New Issue
Block a user