You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/07/27 06:53:46 UTC

[GitHub] [spark] HyukjinKwon commented on a change in pull request #29241: [SPARK-32443][CORE] Use POSIX-compatible `command -v` in testCommandAvailable

HyukjinKwon commented on a change in pull request #29241:
URL: https://github.com/apache/spark/pull/29241#discussion_r460681180



##########
File path: core/src/main/scala/org/apache/spark/TestUtils.scala
##########
@@ -236,7 +236,11 @@ private[spark] object TestUtils {
    * Test if a command is available.
    */
   def testCommandAvailable(command: String): Boolean = {
-    val attempt = Try(Process(command).run(ProcessLogger(_ => ())).exitValue())
+    val attempt = if (Utils.isWindows) {
+      Try(Process(command).run(ProcessLogger(_ => ())).exitValue())

Review comment:
       @dongjoon-hyun, I manually tested. `command` -> `$"WHERE $command"` seems working fine in Windows with Scala 2.13.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org