Skip to content

Commit 0eda689

Browse files
chore: use array instead of string
1 parent f33c545 commit 0eda689

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/code-server/install.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,42 +23,42 @@ if [[ -n $WORKSPACE ]]; then
2323
CODE_SERVER_WORKSPACE="$WORKSPACE"
2424
fi
2525

26-
DISABLE_FLAGS=""
26+
DISABLE_FLAGS=()
2727

2828
if [[ "$DISABLEFILEDOWNLOADS" == "true" ]]; then
29-
DISABLE_FLAGS="$DISABLE_FLAGS --disable-file-downloads"
29+
DISABLE_FLAGS+=(--disable-file-downloads)
3030
fi
3131

3232
if [[ "$DISABLEFILEUPLOADS" == "true" ]]; then
33-
DISABLE_FLAGS="$DISABLE_FLAGS --disable-file-uploads"
33+
DISABLE_FLAGS+=(--disable-file-uploads)
3434
fi
3535

3636
if [[ "$DISABLEGETTINGSTARTEDOVERRIDE" == "true" ]]; then
37-
DISABLE_FLAGS="$DISABLE_FLAGS --disable-getting-started-override"
37+
DISABLE_FLAGS+=(--disable-getting-started-override)
3838
fi
3939

4040
if [[ "$DISABLEPROXY" == "true" ]]; then
41-
DISABLE_FLAGS="$DISABLE_FLAGS --disable-proxy"
41+
DISABLE_FLAGS+=(--disable-proxy)
4242
fi
4343

4444
if [[ "$DISABLETELEMETRY" == "true" ]]; then
45-
DISABLE_FLAGS="$DISABLE_FLAGS --disable-telemetry"
45+
DISABLE_FLAGS+=(--disable-telemetry)
4646
fi
4747

4848
if [[ "$DISABLEUPDATECHECK" == "true" ]]; then
49-
DISABLE_FLAGS="$DISABLE_FLAGS --disable-update-check"
49+
DISABLE_FLAGS+=(--disable-update-check)
5050
fi
5151

5252
if [[ "$DISABLEWORKSPACETRUST" == "true" ]]; then
53-
DISABLE_FLAGS="$DISABLE_FLAGS --disable-workspace-trust"
53+
DISABLE_FLAGS+=(--disable-workspace-trust)
5454
fi
5555

5656
cat > /usr/local/bin/code-server-entrypoint \
5757
<< EOF
5858
#!/usr/bin/env bash
5959
set -e
6060
61-
su $_REMOTE_USER -c 'code-server --auth "$AUTH" --bind-addr "$HOST:$PORT" $DISABLE_FLAGS "$CODE_SERVER_WORKSPACE"'
61+
su $_REMOTE_USER -c 'code-server --auth "$AUTH" --bind-addr "$HOST:$PORT" ${DISABLE_FLAGS[*]} "$CODE_SERVER_WORKSPACE"'
6262
EOF
6363

6464
chmod +x /usr/local/bin/code-server-entrypoint

0 commit comments

Comments
 (0)