Skip to content
Prev Previous commit
Next Next commit
Use runtime instead
  • Loading branch information
HyukjinKwon committed Jul 27, 2020
commit cef6b5d35492846c13e3e767f61b7573f434979f
2 changes: 1 addition & 1 deletion core/src/main/scala/org/apache/spark/TestUtils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ private[spark] object TestUtils {
val attempt = if (Utils.isWindows) {
Try(Process(s"WHERE $command").run(ProcessLogger(_ => ())).exitValue())
} else {
Try(Process(Seq(s"command", "-v", command)).run(logger).exitValue())
Try(Runtime.getRuntime.exec(Array(s"command", "-v", command)).exitValue())
}
val ret = attempt.isSuccess && attempt.get == 0
val anotherAttempt =
Expand Down