summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorMichal J <box@wejn.org>2023-01-17 20:36:37 +0100
committerGitHub <noreply@github.com>2023-01-17 20:36:37 +0100
commitcbfbb0b1b3be395941ec649be70d139697ef5260 (patch)
treed2a99a16d6a3d4b791c0b5bc04fdc241b784f17f /bin
parentddef5c65c60eed673a22bff8f16c25668a408801 (diff)
downloadelixir-cbfbb0b1b3be395941ec649be70d139697ef5260.tar.gz
Fix escaping of positional args (#12345) (#12346)
This fixes #1234 where previous escaping pattern accidentally used invalid character range in the regexp. By using `@` as delimiter and pushing the `-` to the end of the bracket we avoid both problems.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/elixir2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/elixir b/bin/elixir
index 5a8cd9d87..c89137847 100755
--- a/bin/elixir
+++ b/bin/elixir
@@ -236,7 +236,7 @@ set -- "$ERTS_BIN$ERL_EXEC" -pa "$SCRIPT_PATH"/../lib/*/ebin $ELIXIR_ERL_OPTIONS
if [ -n "$RUN_ERL_PIPE" ]; then
ESCAPED=""
for PART in "$@"; do
- ESCAPED="$ESCAPED $(echo "$PART" | sed 's/[^a-zA-Z0-9_\-\/]/\\&/g')"
+ ESCAPED="$ESCAPED $(echo "$PART" | sed 's@[^a-zA-Z0-9_/-]@\\&@g')"
done
mkdir -p "$RUN_ERL_PIPE"
mkdir -p "$RUN_ERL_LOG"