jaceklaskowski commented on code in PR #52261: URL: https://github.com/apache/spark/pull/52261#discussion_r2334744422
########## core/src/main/scala/org/apache/spark/deploy/SparkPipelines.scala: ########## @@ -65,10 +65,10 @@ object SparkPipelines extends Logging { } else if (opt == "--class") { logError("--class argument not supported.") throw SparkUserAppException(SparkExitCode.EXIT_FAILURE) - } else if (opt == "--conf" && value.startsWith("spark.api.mode=")) { - if (value.toLowerCase(Locale.ROOT) != "spark.api.mode=connect") { + } else if ((opt == "--conf" || opt == "-c") && value.startsWith("spark.api.mode=")) { + if (value.stripPrefix("spark.api.mode=").trim.toLowerCase(Locale.ROOT) != "connect") { logError( - "--spark.api.mode must be 'connect'. " + + "spark.api.mode must be 'connect'. " + Review Comment: Can you use the following so it's clear what caused the error? ``` s"--spark.api.mode must be 'connect' (was: . $value). " ``` -- 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. To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org