mirror of https://github.com/sbt/sbt.git
Fix build so it works on Windows
This commit is contained in:
parent
ec5bdc2381
commit
c920919c2c
|
|
@ -34,6 +34,7 @@ def buildLevelSettings: Seq[Setting[_]] =
|
||||||
scmInfo := Some(ScmInfo(url("https://github.com/sbt/sbt"), "git@github.com:sbt/sbt.git")),
|
scmInfo := Some(ScmInfo(url("https://github.com/sbt/sbt"), "git@github.com:sbt/sbt.git")),
|
||||||
resolvers += Resolver.mavenLocal,
|
resolvers += Resolver.mavenLocal,
|
||||||
scalafmtOnCompile := true,
|
scalafmtOnCompile := true,
|
||||||
|
scalafmtOnCompile in Sbt := false,
|
||||||
scalafmtVersion := "1.3.0",
|
scalafmtVersion := "1.3.0",
|
||||||
))
|
))
|
||||||
|
|
||||||
|
|
@ -463,10 +464,9 @@ lazy val sbtIgnoredProblems = {
|
||||||
}
|
}
|
||||||
|
|
||||||
def runNpm(command: String, base: File, log: sbt.internal.util.ManagedLogger) = {
|
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._
|
import scala.sys.process._
|
||||||
try {
|
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)
|
if (exitCode != 0) throw new Exception("Process returned exit code: " + exitCode)
|
||||||
} catch {
|
} catch {
|
||||||
case e: java.io.IOException => log.warn("failed to run npm " + e.getMessage)
|
case e: java.io.IOException => log.warn("failed to run npm " + e.getMessage)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue