mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-20 16:15:59 +01:00
Fix escaping of argument in iexlive and iexdebug
This commit is contained in:
parent
e31799a3b1
commit
842d52352a
@ -159,6 +159,15 @@ export CONTRIB_MODULES_PATH
|
||||
export CONTRIB_MODULES_CONF_DIR
|
||||
export ERL_LIBS
|
||||
|
||||
shell_escape_str()
|
||||
{
|
||||
if test $# -eq 0; then
|
||||
printf '"" '
|
||||
else
|
||||
shell_escape "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
shell_escape()
|
||||
{
|
||||
local RES=()
|
||||
@ -208,10 +217,10 @@ iexdebug()
|
||||
# Elixir shell is hidden as default
|
||||
CMD="`shell_escape \"$IEX\" \"$IEXNAME\" \"debug-${TTY}-${ERLANG_NODE}\"` \
|
||||
-remsh $ERLANG_NODE \
|
||||
--erl \"`shell_escape \"$KERNEL_OPTS\"\" \
|
||||
--erl \"`shell_escape \"$ERLANG_OPTS\"\" \
|
||||
--erl \"`shell_escape \"${ARGS[@]}\"\" \
|
||||
--erl \"`shell_escape \"$@\"\""
|
||||
--erl `shell_escape \"$KERNEL_OPTS\"` \
|
||||
--erl `shell_escape \"$ERLANG_OPTS\"` \
|
||||
--erl `shell_escape \"${ARGS[@]}\"` \
|
||||
--erl `shell_escape_str \"$@\"`"
|
||||
$EXEC_CMD "$CMD"
|
||||
}
|
||||
|
||||
@ -233,14 +242,15 @@ live()
|
||||
iexlive()
|
||||
{
|
||||
livewarning
|
||||
echo $@
|
||||
CMD="`shell_escape \"$IEX\" \"$IEXNAME\" \"${ERLANG_NODE}\"` \
|
||||
--erl \"-mnesia dir \\\"$SPOOL_DIR\\\"\" \
|
||||
--erl \"`shell_escape \"$KERNEL_OPTS\"`\" \
|
||||
--erl \"`shell_escape \"$EJABBERD_OPTS\"`\" \
|
||||
--app ejabberd \
|
||||
--erl \"`shell_escape \"$ERLANG_OPTS\"`\" \
|
||||
--erl \"`shell_escape \"${ARGS[@]}\"`\" \
|
||||
--erl \"`shell_escape \"$@\"`\""
|
||||
--erl `shell_escape \"$ERLANG_OPTS\"` \
|
||||
--erl `shell_escape \"${ARGS[@]}\"` \
|
||||
--erl `shell_escape_str \"$@\"`"
|
||||
$EXEC_CMD "$CMD"
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user