Skip to content

Commit fef2c41

Browse files
committed
fix: escape WORKSPACE_ARG references to avoid Terraform template parsing
Use 14899 to escape shell variables so they're not treated as Terraform template variables by the templatefile() function.
1 parent 56dbdd9 commit fef2c41

File tree

1 file changed

+7
-7
lines changed
  • registry/coder/modules/vscode-web

1 file changed

+7
-7
lines changed

registry/coder/modules/vscode-web/run.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ fi
2525
run_vscode_web() {
2626
# Determine what to pass as the workspace argument
2727
WORKSPACE_ARG=""
28-
if [ -n "${WORKSPACE}" ]; then
29-
WORKSPACE_ARG="${WORKSPACE}"
30-
elif [ -n "${FOLDER}" ]; then
31-
WORKSPACE_ARG="${FOLDER}"
28+
if [ -n "$${WORKSPACE}" ]; then
29+
WORKSPACE_ARG="$${WORKSPACE}"
30+
elif [ -n "$${FOLDER}" ]; then
31+
WORKSPACE_ARG="$${FOLDER}"
3232
fi
3333

34-
echo "👷 Running $VSCODE_WEB serve-local with workspace: ${WORKSPACE_ARG}"
35-
echo "Check logs at ${LOG_PATH}!"
36-
"$VSCODE_WEB" serve-local "$EXTENSION_ARG" "$SERVER_BASE_PATH_ARG" "$DISABLE_TRUST_ARG" --port "${PORT}" --host 127.0.0.1 --accept-server-license-terms --without-connection-token --telemetry-level "${TELEMETRY_LEVEL}" "${WORKSPACE_ARG}" > "${LOG_PATH}" 2>&1 &
34+
echo "👷 Running $VSCODE_WEB serve-local with workspace: $${WORKSPACE_ARG}"
35+
echo "Check logs at $${LOG_PATH}!"
36+
"$VSCODE_WEB" serve-local "$EXTENSION_ARG" "$SERVER_BASE_PATH_ARG" "$DISABLE_TRUST_ARG" --port "$${PORT}" --host 127.0.0.1 --accept-server-license-terms --without-connection-token --telemetry-level "$${TELEMETRY_LEVEL}" "$${WORKSPACE_ARG}" > "$${LOG_PATH}" 2>&1 &
3737
}
3838

3939
# Check if the settings file exists...

0 commit comments

Comments
 (0)