30 lines
1.0 KiB
Diff
30 lines
1.0 KiB
Diff
From 73b65eca5af294a8afbed5bc73c178da18f0055c Mon Sep 17 00:00:00 2001
|
|
From: cjschneider2 <cjschneider2@users.noreply.github.com>
|
|
Date: Fri, 23 Jun 2023 16:04:29 +0200
|
|
Subject: [PATCH] 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
|
|
---
|
|
bin/elixir | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/bin/elixir b/bin/elixir
|
|
index 3c0323f0f1..cb0a84650b 100755
|
|
--- a/bin/elixir
|
|
+++ b/bin/elixir
|
|
@@ -233,7 +233,7 @@ set -- "$ERTS_BIN$ERL_EXEC" -noshell -elixir_root "$SCRIPT_PATH"/../lib -pa "$SC
|
|
if [ -n "$RUN_ERL_PIPE" ]; then
|
|
ESCAPED=""
|
|
for PART in "$@"; do
|
|
- ESCAPED="$ESCAPED $(echo "$PART" | sed 's@[^a-zA-Z0-9_/-]@\\&@g')"
|
|
+ ESCAPED="$ESCAPED $(printf '%s' "$PART" | sed 's@[^a-zA-Z0-9_/-]@\\&@g')"
|
|
done
|
|
mkdir -p "$RUN_ERL_PIPE"
|
|
mkdir -p "$RUN_ERL_LOG"
|