File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed
registry/coder/modules/vscode-web Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -121,6 +121,12 @@ variable "use_cached" {
121121 default = false
122122}
123123
124+ variable "disable_trust" {
125+ type = bool
126+ description = " Disables workspace trust protection for VS Code Web."
127+ default = false
128+ }
129+
124130variable "extensions_dir" {
125131 type = string
126132 description = " Override the directory to store extensions in."
@@ -169,6 +175,7 @@ resource "coder_script" "vscode-web" {
169175 SETTINGS : replace (jsonencode (var. settings ), " \" " , " \\\" " ),
170176 OFFLINE : var.offline,
171177 USE_CACHED : var.use_cached,
178+ DISABLE_TRUST : var.disable_trust,
172179 EXTENSIONS_DIR : var.extensions_dir,
173180 FOLDER : var.folder,
174181 AUTO_INSTALL_EXTENSIONS : var.auto_install_extensions,
Original file line number Diff line number Diff line change @@ -16,10 +16,16 @@ if [ -n "${SERVER_BASE_PATH}" ]; then
1616 SERVER_BASE_PATH_ARG=" --server-base-path=${SERVER_BASE_PATH} "
1717fi
1818
19+ # Set disable workspace trust
20+ DISABLE_TRUST_ARG=" "
21+ if [ " ${DISABLE_TRUST} " = true ]; then
22+ DISABLE_TRUST_ARG=" --disable-workspace-trust"
23+ fi
24+
1925run_vscode_web () {
20- echo " 👷 Running $VSCODE_WEB serve-local $EXTENSION_ARG $SERVER_BASE_PATH_ARG --port ${PORT} --host 127.0.0.1 --accept-server-license-terms --without-connection-token --telemetry-level ${TELEMETRY_LEVEL} in the background..."
26+ echo " 👷 Running $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} in the background..."
2127 echo " Check logs at ${LOG_PATH} !"
22- " $VSCODE_WEB " serve-local " $EXTENSION_ARG " " $SERVER_BASE_PATH_ARG " --port " ${PORT} " --host 127.0.0.1 --accept-server-license-terms --without-connection-token --telemetry-level " ${TELEMETRY_LEVEL} " > " ${LOG_PATH} " 2>&1 &
28+ " $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} " > " ${LOG_PATH} " 2>&1 &
2329}
2430
2531# Check if the settings file exists...
You can’t perform that action at this time.
0 commit comments