mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 02:18:26 +00:00
Build: Fix shell script run under Windows OS; small refactoring to remove the getOrElse hack
This commit is contained in:
@ -24,8 +24,8 @@ object Cmd {
|
|||||||
|
|
||||||
def exec(cmd: Seq[String], wd: Option[File]): Result = {
|
def exec(cmd: Seq[String], wd: Option[File]): Result = {
|
||||||
val command =
|
val command =
|
||||||
sys.props.get("os.name").getOrElse("").toLowerCase match {
|
sys.props.get("os.name") match {
|
||||||
case win if win.startsWith("windows") => Seq ("cmd", "/C") ++ cmd
|
case Some(name) if name.toLowerCase.startsWith("windows") => Seq ("cmd", "/C") ++ cmd
|
||||||
case _ => cmd
|
case _ => cmd
|
||||||
}
|
}
|
||||||
val capt = new Capture
|
val capt = new Capture
|
||||||
|
Reference in New Issue
Block a user