We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d46ae48 commit 750b53cCopy full SHA for 750b53c
src/run_conversion.sh
@@ -202,7 +202,12 @@ if [[ -n "$SPARK_PARTITIONS" ]]; then
202
fi
203
204
205
-JAVA_CMD=(java "${JAVA_SPARK_OPTS[@]}" -jar "$JAR" toFile -m "$IN" -o "$OUT_DIR/$OUT_NAME")
+# Build Java command in a macOS Bash-3-compatible way:
206
+# with `set -u`, expanding an empty array (`"${arr[@]}"`) raises "unbound variable".
207
+JAVA_CMD=(java -jar "$JAR" toFile -m "$IN" -o "$OUT_DIR/$OUT_NAME")
208
+if (( ${#JAVA_SPARK_OPTS[@]} > 0 )); then
209
+ JAVA_CMD=(java "${JAVA_SPARK_OPTS[@]}" -jar "$JAR" toFile -m "$IN" -o "$OUT_DIR/$OUT_NAME")
210
+fi
211
212
# Ensure repeated runs with the same OUT_NAME do not accumulate old artifacts.
213
if [[ -d "$OUT_DIR/$OUT_NAME" ]]; then
0 commit comments