diff --git a/yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ClientArguments.scala b/yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ClientArguments.scala
index a001060cdb7461207cdab067dd1e775c488fe1ec..c565f2dde24fca563b49e003b85150821da3367e 100644
--- a/yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ClientArguments.scala
+++ b/yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ClientArguments.scala
@@ -95,7 +95,7 @@ class ClientArguments(val args: Array[String], val sparkConf: SparkConf) {
           executorMemory = value
           args = tail
 
-        case ("--worker-cores" | "--executor-memory") :: IntParam(value) :: tail =>
+        case ("--worker-cores" | "--executor-cores") :: IntParam(value) :: tail =>
           if (args(0) == "--worker-cores") {
             println("--worker-cores is deprecated. Use --executor-cores instead.")
           }