mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-23 02:48:26 +00:00
Merge pull request #1461 from arittner/buildonwindows-cmd
Build: Fix shell script run under Windows OS
This commit is contained in:
@ -23,8 +23,14 @@ object Cmd {
|
||||
}
|
||||
|
||||
def exec(cmd: Seq[String], wd: Option[File]): Result = {
|
||||
val command =
|
||||
sys.props.get("os.name") match {
|
||||
case Some(name) if name.toLowerCase.startsWith("windows") =>
|
||||
Seq("cmd", "/C") ++ cmd
|
||||
case _ => cmd
|
||||
}
|
||||
val capt = new Capture
|
||||
val rc = Process(cmd, wd).!(capt.logger)
|
||||
val rc = Process(command, wd).!(capt.logger)
|
||||
Result(rc, capt.out.get.mkString("\n"), capt.err.get.mkString("\n"))
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user