Skip to content

Commit 73b65ec

Browse files
authored
Use printf instead of echo to output user flags (#12704)
Fixes #12677. Using printf here prevents an error when outputting the filtered flag `-e` as doing with with `echo "-e"` doesn't output anything (deleting the option we wanted to filter). More info: https://unix.stackexchange.com/a/65819
1 parent acca527 commit 73b65ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/elixir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ set -- "$ERTS_BIN$ERL_EXEC" -noshell -elixir_root "$SCRIPT_PATH"/../lib -pa "$SC
233233
if [ -n "$RUN_ERL_PIPE" ]; then
234234
ESCAPED=""
235235
for PART in "$@"; do
236-
ESCAPED="$ESCAPED $(echo "$PART" | sed 's@[^a-zA-Z0-9_/-]@\\&@g')"
236+
ESCAPED="$ESCAPED $(printf '%s' "$PART" | sed 's@[^a-zA-Z0-9_/-]@\\&@g')"
237237
done
238238
mkdir -p "$RUN_ERL_PIPE"
239239
mkdir -p "$RUN_ERL_LOG"

0 commit comments

Comments
 (0)