Skip to content

Commit

Permalink
preserve the way args are passed to sup (2600hz#6260)
Browse files Browse the repository at this point in the history
  • Loading branch information
lazedo authored and jamesaimonetti committed Jan 22, 2020
1 parent 4bda3ae commit 2f585f8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion core/sup/priv/sup
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ shift $(($OPTIND - 1))
KAZOO_NODE=${SUP_NODE_ARG:-${KAZOO_NODE:-kazoo_apps}}
KAZOO_COOKIE=${SUP_COOKIE_ARG:-${KAZOO_COOKIE:-change_me}}

${DEFAULT_ROOT}/bin/kazoo escript lib/sup-*/priv/sup.escript -n ${KAZOO_NODE} -c ${KAZOO_COOKIE} $*
${DEFAULT_ROOT}/bin/kazoo escript lib/sup-*/priv/sup.escript -n ${KAZOO_NODE} -c ${KAZOO_COOKIE} "$@"
exit $?
7 changes: 3 additions & 4 deletions rel/kazoo
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,9 @@ relx_nodetool() {

# Run an escript in the node's environment
relx_escript() {
shift; scriptpath="$1"; shift
shift; scriptpath="$ROOTDIR/$1"; shift
export RELEASE_ROOT_DIR

"$ERTS_DIR/bin/escript" "$ROOTDIR/$scriptpath" $@
"$ERTS_DIR/bin/escript" $scriptpath "$@"
}

# Output a start command for the last argument of run_erl
Expand Down Expand Up @@ -434,7 +433,7 @@ case "$1" in

escript)
## Run an escript under the node's environment
if ! relx_escript $@; then
if ! relx_escript "$@"; then
exit 1
fi
;;
Expand Down

0 comments on commit 2f585f8

Please sign in to comment.