Build: Fix shell script run under Windows OS; small refactoring to remove the getOrElse hack

This commit is contained in:
Aljoscha Rittner 2022-03-21 15:32:26 +01:00
parent 92079fe2e0
commit ee34bc76ed

View File

@ -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