Skip to content
Prev Previous commit
Next Next commit
Use the old behavior for Windows
  • Loading branch information
dongjoon-hyun authored and HyukjinKwon committed Jul 27, 2020
commit 5164b4f35ddcd343a8ac21c2232786a13a36ebac
6 changes: 5 additions & 1 deletion core/src/main/scala/org/apache/spark/TestUtils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,11 @@ private[spark] object TestUtils {
* Test if a command is available.
*/
def testCommandAvailable(command: String): Boolean = {
val attempt = Try(Process(s"command -v $command").run(ProcessLogger(_ => ())).exitValue())
val attempt = if (Utils.isWindows) {
Try(Process(command).run(ProcessLogger(_ => ())).exitValue())
} else {
Try(Process(s"command -v $command").run(ProcessLogger(_ => ())).exitValue())
}
attempt.isSuccess && attempt.get == 0
}

Expand Down