From ee34bc76ed31bf400ed7496dd92afa74252e2484 Mon Sep 17 00:00:00 2001 From: Aljoscha Rittner Date: Mon, 21 Mar 2022 15:32:26 +0100 Subject: [PATCH] Build: Fix shell script run under Windows OS; small refactoring to remove the getOrElse hack --- project/Cmd.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/project/Cmd.scala b/project/Cmd.scala index a9e0a8d9..ebeb7dfd 100644 --- a/project/Cmd.scala +++ b/project/Cmd.scala @@ -24,8 +24,8 @@ object Cmd { def exec(cmd: Seq[String], wd: Option[File]): Result = { val command = - sys.props.get("os.name").getOrElse("").toLowerCase match { - case win if win.startsWith("windows") => Seq ("cmd", "/C") ++ cmd + sys.props.get("os.name") match { + case Some(name) if name.toLowerCase.startsWith("windows") => Seq ("cmd", "/C") ++ cmd case _ => cmd } val capt = new Capture