Skip to content
This repository was archived by the owner on Jun 10, 2026. It is now read-only.

Commit 94d9c71

Browse files
committed
gw(deploy): satisfy shellcheck on deploy-to-vmm.sh
The pre-existing script had three latent issues that weren't checked because the file hadn't been touched. Modifying it for the PP rollout brings it into the prek diff, so fix them now: - SC1091: `source .env` — explicitly mark dynamic include - SC2002: replace `cat … | tr …` with `tr … < file` redirect - SC2086: quote $WG_ADDR in the cut pipeline
1 parent dd51cac commit 94d9c71

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

gateway/dstack-app/deploy-to-vmm.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ if [ -f ".env" ]; then
3131
# Load variables from .env
3232
echo "Loading environment variables from .env file..."
3333
set -a
34+
# shellcheck disable=SC1091
3435
source .env
3536
set +a
3637
else
@@ -92,7 +93,7 @@ GUEST_AGENT_ADDR=127.0.0.1:9206
9293
WG_ADDR=0.0.0.0:9202
9394
9495
# The token used to launch the App
95-
APP_LAUNCH_TOKEN=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
96+
APP_LAUNCH_TOKEN=$(tr -dc 'a-zA-Z0-9' < /dev/urandom | fold -w 32 | head -n 1)
9697
9798
# PROXY protocol: read v1/v2 header from inbound connections (e.g. when this
9899
# gateway sits behind a PP-aware L4 LB such as Cloudflare Spectrum or haproxy
@@ -132,7 +133,7 @@ done
132133

133134
CLI="../../vmm/src/vmm-cli.py --url $VMM_RPC"
134135

135-
WG_PORT=$(echo $WG_ADDR | cut -d':' -f2)
136+
WG_PORT=$(echo "$WG_ADDR" | cut -d':' -f2)
136137
COMPOSE_TMP=$(mktemp)
137138

138139
cp docker-compose.yaml "$COMPOSE_TMP"

0 commit comments

Comments
 (0)