Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.0.0
-
None
Description
There's a particular snippet in spark-class here that runs the spark-launcher code in a subshell.
# The launcher library will print arguments separated by a NULL character, to allow arguments with # characters that would be otherwise interpreted by the shell. Read that in a while loop, populating # an array that will be used to exec the final command. CMD=() while IFS= read -d '' -r ARG; do CMD+=("$ARG") done < <("$RUNNER" -cp "$LAUNCH_CLASSPATH" org.apache.spark.launcher.Main "$@")
The problem is that the if the launcher Main fails, this code still still returns success and continues, even though the top level script is marked set -e. This is because the launcher.Main is run within a subshell.