Skip to content

Commit 15cf874

Browse files
committed
Turn $ARGS into array to fix shellcheck issue
1 parent e63bb54 commit 15cf874

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/utils/proxy/start.sh

+4-3
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@ PROXYDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
44
PORT=${PORT:-9000}
55

66
PROXYBIN=${PROXYBIN:-"$(which mitmdump)"}
7-
ARGS="-s '$PROXYDIR/proxy.py' -p $PORT"
7+
8+
ARGS=(-s "$PROXYDIR/proxy.py" -p "$PORT")
89
if [[ -n "$AUTH" ]]; then
9-
ARGS="$ARGS --proxyauth $AUTH"
10+
ARGS+=("--proxyauth" "$AUTH")
1011
fi
1112
PIDFILE="$PROXYDIR/proxy-$PORT.pid"
1213

1314
set -x
1415

15-
start-stop-daemon --verbose --start --background --pidfile "$PIDFILE" --make-pidfile --exec "$PROXYBIN" -- $ARGS
16+
start-stop-daemon --verbose --start --background --pidfile "$PIDFILE" --make-pidfile --exec "$PROXYBIN" -- "${ARGS[@]}"
1617

1718
ps -p "$(cat "$PIDFILE")" u
1819
sleep 2

0 commit comments

Comments
 (0)