From f908e457f594b19f049e93657a6861721b961447 Mon Sep 17 00:00:00 2001 From: Michael Brewer Date: Wed, 24 Apr 2024 23:34:57 -0700 Subject: [PATCH 01/21] feat(vscode-web): add offline, use_cached, extensions_dir and auto_install_extensions --- vscode-web/main.test.ts | 42 ++++++++++++++++++++++++++ vscode-web/main.tf | 41 ++++++++++++++++++++++++++ vscode-web/run.sh | 65 ++++++++++++++++++++++++++++++++++------- 3 files changed, 137 insertions(+), 11 deletions(-) create mode 100644 vscode-web/main.test.ts diff --git a/vscode-web/main.test.ts b/vscode-web/main.test.ts new file mode 100644 index 00000000..d8e0e68e --- /dev/null +++ b/vscode-web/main.test.ts @@ -0,0 +1,42 @@ +import { describe, expect, it } from "bun:test"; +import { runTerraformApply, runTerraformInit } from "../test"; + +describe("vscode-web", async () => { + await runTerraformInit(import.meta.dir); + + it("accept_license should be set to true", () => { + const t = async () => { + await runTerraformApply(import.meta.dir, { + agent_id: "foo", + accept_license: "false", + }); + }; + expect(t).toThrow("Invalid value for variable"); + }); + + it("use_cached and offline can not be used together", () => { + const t = async () => { + await runTerraformApply(import.meta.dir, { + agent_id: "foo", + accept_license: "true", + use_cached: "true", + offline: "true", + }); + }; + expect(t).toThrow("Offline and Use Cached can not be used together"); + }); + + it("offline and extensions can not be used together", () => { + const t = async () => { + await runTerraformApply(import.meta.dir, { + agent_id: "foo", + accept_license: "true", + offline: "true", + extensions: '["1", "2"]', + }); + }; + expect(t).toThrow("Offline mode does not allow extensions to be installed"); + }); + + // More tests depend on shebang refactors +}); diff --git a/vscode-web/main.tf b/vscode-web/main.tf index dd2ab3b4..45771d67 100644 --- a/vscode-web/main.tf +++ b/vscode-web/main.tf @@ -97,6 +97,30 @@ variable "settings" { default = {} } +variable "offline" { + type = bool + description = "Just run code-server in the background, don't fetch it from GitHub" + default = false +} + +variable "use_cached" { + type = bool + description = "Uses cached copy code-server in the background, otherwise fetched it from GitHub" + default = false +} + +variable "extensions_dir" { + type = string + description = "Override the directory to store extensions in." + default = "" +} + +variable "auto_install_extensions" { + type = bool + description = "Automatically install recommended extensions when code-server starts." + default = false +} + resource "coder_script" "vscode-web" { agent_id = var.agent_id display_name = "VS Code Web" @@ -109,8 +133,25 @@ resource "coder_script" "vscode-web" { TELEMETRY_LEVEL : var.telemetry_level, // This is necessary otherwise the quotes are stripped! SETTINGS : replace(jsonencode(var.settings), "\"", "\\\""), + OFFLINE : var.offline, + USE_CACHED : var.use_cached, + EXTENSIONS_DIR : var.extensions_dir, + FOLDER : var.folder, + AUTO_INSTALL_EXTENSIONS : var.auto_install_extensions, }) run_on_start = true + + lifecycle { + precondition { + condition = !var.offline || length(var.extensions) == 0 + error_message = "Offline mode does not allow extensions to be installed" + } + + precondition { + condition = !var.offline || !var.use_cached + error_message = "Offline and Use Cached can not be used together" + } + } } resource "coder_app" "vscode-web" { diff --git a/vscode-web/run.sh b/vscode-web/run.sh index 491906f8..57f4d650 100755 --- a/vscode-web/run.sh +++ b/vscode-web/run.sh @@ -2,6 +2,40 @@ BOLD='\033[0;1m' EXTENSIONS=("${EXTENSIONS}") +VSCODE_SERVER="${INSTALL_PREFIX}/bin/code-server" + +# Set extension directory +EXTENSION_ARG="" +if [ -n "${EXTENSIONS_DIR}" ]; then + EXTENSION_ARG="--extensions-dir=${EXTENSIONS_DIR}" +fi + +run_code_server() { + echo "👷 Running $VSCODE_SERVER serve-local --port ${PORT} --host 127.0.0.1 --accept-server-license-terms serve-local --without-connection-token --telemetry-level ${TELEMETRY_LEVEL} in the background..." + echo "Check logs at ${LOG_PATH}!" + "$VSCODE_SERVER" serve-local "$EXTENSION_ARG" --port "${PORT}" --host 127.0.0.1 --accept-server-license-terms serve-local --without-connection-token --telemetry-level "${TELEMETRY_LEVEL}" > "${LOG_PATH}" 2>&1 & +} + +# Check if the settings file exists... +if [ ! -f ~/.vscode-server/data/Machine/settings.json ]; then + echo "⚙️ Creating settings file..." + mkdir -p ~/.vscode-server/data/Machine + echo "${SETTINGS}" > ~/.vscode-server/data/Machine/settings.json +fi + +# Check if code-server is already installed for offline or cached mode +if [ -f "$VSCODE_SERVER" ]; then + if [ "${OFFLINE}" = true ] || [ "${USE_CACHED}" = true ]; then + echo "🥳 Found a copy of code-server" + run_code_server + exit 0 + fi +fi +# Offline mode always expects a copy of code-server to be present +if [ "${OFFLINE}" = true ]; then + echo "Failed to find a copy of code-server" + exit 1 +fi # Create install prefix mkdir -p ${INSTALL_PREFIX} @@ -28,8 +62,6 @@ if [ $? -ne 0 ]; then fi printf "$${BOLD}Microsoft Visual Studio Code Server has been installed.\n" -VSCODE_SERVER="${INSTALL_PREFIX}/bin/code-server" - # Install each extension... IFS=',' read -r -a EXTENSIONLIST <<< "$${EXTENSIONS}" for extension in "$${EXTENSIONLIST[@]}"; do @@ -37,20 +69,31 @@ for extension in "$${EXTENSIONLIST[@]}"; do continue fi printf "🧩 Installing extension $${CODE}$extension$${RESET}...\n" - output=$($VSCODE_SERVER --install-extension "$extension" --force) + output=$($VSCODE_SERVER "$EXTENSION_ARG" --install-extension "$extension" --force) if [ $? -ne 0 ]; then echo "Failed to install extension: $extension: $output" exit 1 fi done -# Check if the settings file exists... -if [ ! -f ~/.vscode-server/data/Machine/settings.json ]; then - echo "⚙️ Creating settings file..." - mkdir -p ~/.vscode-server/data/Machine - echo "${SETTINGS}" > ~/.vscode-server/data/Machine/settings.json +if [ "${AUTO_INSTALL_EXTENSIONS}" = true ]; then + if ! command -v jq > /dev/null; then + echo "jq is required to install extensions from a workspace file." + exit 0 + fi + + WORKSPACE_DIR="$HOME" + if [ -n "${FOLDER}" ]; then + WORKSPACE_DIR="${FOLDER}" + fi + + if [ -f "$WORKSPACE_DIR/.vscode/extensions.json" ]; then + printf "🧩 Installing extensions from %s/.vscode/extensions.json...\n" "$WORKSPACE_DIR" + extensions=$(jq -r '.recommendations[]' "$WORKSPACE_DIR"/.vscode/extensions.json) + for extension in $extensions; do + $VSCODE_SERVER "$EXTENSION_ARG" --install-extension "$extension" --force + done + fi fi -echo "👷 Running ${INSTALL_PREFIX}/bin/code-server serve-local --port ${PORT} --host 127.0.0.1 --accept-server-license-terms serve-local --without-connection-token --telemetry-level ${TELEMETRY_LEVEL} in the background..." -echo "Check logs at ${LOG_PATH}!" -"${INSTALL_PREFIX}/bin/code-server" serve-local --port "${PORT}" --host 127.0.0.1 --accept-server-license-terms serve-local --without-connection-token --telemetry-level "${TELEMETRY_LEVEL}" > "${LOG_PATH}" 2>&1 & +run_code_server From dcc1f665d6d4ddff8dbc1bd14c95dfe1fe40b289 Mon Sep 17 00:00:00 2001 From: Michael Brewer Date: Mon, 29 Apr 2024 21:25:31 -0700 Subject: [PATCH 02/21] Update main.tf --- vscode-web/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vscode-web/main.tf b/vscode-web/main.tf index 45771d67..72d59c50 100644 --- a/vscode-web/main.tf +++ b/vscode-web/main.tf @@ -99,7 +99,7 @@ variable "settings" { variable "offline" { type = bool - description = "Just run code-server in the background, don't fetch it from GitHub" + description = "Just run VS Code Web in the background, don't fetch it from GitHub" default = false } From d509b814f4bd3aefba738b4a13a50d49c68f7061 Mon Sep 17 00:00:00 2001 From: Michael Brewer Date: Thu, 2 May 2024 00:28:11 -0700 Subject: [PATCH 03/21] chore: rename --- vscode-web/main.tf | 4 ++-- vscode-web/run.sh | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/vscode-web/main.tf b/vscode-web/main.tf index 72d59c50..c9d5682d 100644 --- a/vscode-web/main.tf +++ b/vscode-web/main.tf @@ -105,7 +105,7 @@ variable "offline" { variable "use_cached" { type = bool - description = "Uses cached copy code-server in the background, otherwise fetched it from GitHub" + description = "Uses cached copy VS Code Web in the background, otherwise fetched it from GitHub" default = false } @@ -117,7 +117,7 @@ variable "extensions_dir" { variable "auto_install_extensions" { type = bool - description = "Automatically install recommended extensions when code-server starts." + description = "Automatically install recommended extensions when VS Code Web starts." default = false } diff --git a/vscode-web/run.sh b/vscode-web/run.sh index 57f4d650..dc29f44e 100755 --- a/vscode-web/run.sh +++ b/vscode-web/run.sh @@ -23,15 +23,15 @@ if [ ! -f ~/.vscode-server/data/Machine/settings.json ]; then echo "${SETTINGS}" > ~/.vscode-server/data/Machine/settings.json fi -# Check if code-server is already installed for offline or cached mode +# Check if vscode-server is already installed for offline or cached mode if [ -f "$VSCODE_SERVER" ]; then if [ "${OFFLINE}" = true ] || [ "${USE_CACHED}" = true ]; then - echo "🥳 Found a copy of code-server" + echo "🥳 Found a copy of VS Code Web" run_code_server exit 0 fi fi -# Offline mode always expects a copy of code-server to be present +# Offline mode always expects a copy of vscode-server to be present if [ "${OFFLINE}" = true ]; then echo "Failed to find a copy of code-server" exit 1 From 1d9585c0d51ea7e5b55bf32dfac0e3b8437ffebc Mon Sep 17 00:00:00 2001 From: Michael Brewer Date: Thu, 2 May 2024 00:59:50 -0700 Subject: [PATCH 04/21] Update vscode-web/run.sh Co-authored-by: Muhammad Atif Ali --- vscode-web/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vscode-web/run.sh b/vscode-web/run.sh index dc29f44e..0a35bd36 100755 --- a/vscode-web/run.sh +++ b/vscode-web/run.sh @@ -33,7 +33,7 @@ if [ -f "$VSCODE_SERVER" ]; then fi # Offline mode always expects a copy of vscode-server to be present if [ "${OFFLINE}" = true ]; then - echo "Failed to find a copy of code-server" + echo "Failed to find a copy of VS Code Web" exit 1 fi From 5685613f6608686e865c310a3f16da7a412a13c8 Mon Sep 17 00:00:00 2001 From: Michael Brewer Date: Thu, 2 May 2024 00:59:58 -0700 Subject: [PATCH 05/21] Update vscode-web/run.sh Co-authored-by: Muhammad Atif Ali --- vscode-web/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vscode-web/run.sh b/vscode-web/run.sh index 0a35bd36..a7af3473 100755 --- a/vscode-web/run.sh +++ b/vscode-web/run.sh @@ -60,7 +60,7 @@ if [ $? -ne 0 ]; then echo "Failed to install Microsoft Visual Studio Code Server: $output" exit 1 fi -printf "$${BOLD}Microsoft Visual Studio Code Server has been installed.\n" +printf "$${BOLD}VS Code Web has been installed.\n" # Install each extension... IFS=',' read -r -a EXTENSIONLIST <<< "$${EXTENSIONS}" From b78593ce6d9cc4fe86f6ab677568d78243bfa250 Mon Sep 17 00:00:00 2001 From: Michael Brewer Date: Thu, 2 May 2024 01:00:05 -0700 Subject: [PATCH 06/21] Update vscode-web/run.sh Co-authored-by: Muhammad Atif Ali --- vscode-web/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vscode-web/run.sh b/vscode-web/run.sh index a7af3473..da706f4f 100755 --- a/vscode-web/run.sh +++ b/vscode-web/run.sh @@ -96,4 +96,4 @@ if [ "${AUTO_INSTALL_EXTENSIONS}" = true ]; then fi fi -run_code_server +run_vscode_web From c6857f7f4f8623b72d9a82e11d7e0704295c6ac4 Mon Sep 17 00:00:00 2001 From: Michael Brewer Date: Thu, 2 May 2024 01:00:12 -0700 Subject: [PATCH 07/21] Update vscode-web/main.tf Co-authored-by: Muhammad Atif Ali --- vscode-web/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vscode-web/main.tf b/vscode-web/main.tf index c9d5682d..b5382f10 100644 --- a/vscode-web/main.tf +++ b/vscode-web/main.tf @@ -105,7 +105,7 @@ variable "offline" { variable "use_cached" { type = bool - description = "Uses cached copy VS Code Web in the background, otherwise fetched it from GitHub" + description = "Uses cached copy of VS Code Web in the background, otherwise fetches it from internet" default = false } From cc614e7b71cc4937e8c79fd487f6603171a0be30 Mon Sep 17 00:00:00 2001 From: Michael Brewer Date: Thu, 2 May 2024 01:00:18 -0700 Subject: [PATCH 08/21] Update vscode-web/run.sh Co-authored-by: Muhammad Atif Ali --- vscode-web/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vscode-web/run.sh b/vscode-web/run.sh index da706f4f..c6b606de 100755 --- a/vscode-web/run.sh +++ b/vscode-web/run.sh @@ -10,7 +10,7 @@ if [ -n "${EXTENSIONS_DIR}" ]; then EXTENSION_ARG="--extensions-dir=${EXTENSIONS_DIR}" fi -run_code_server() { +run_vscode_web() { echo "👷 Running $VSCODE_SERVER serve-local --port ${PORT} --host 127.0.0.1 --accept-server-license-terms serve-local --without-connection-token --telemetry-level ${TELEMETRY_LEVEL} in the background..." echo "Check logs at ${LOG_PATH}!" "$VSCODE_SERVER" serve-local "$EXTENSION_ARG" --port "${PORT}" --host 127.0.0.1 --accept-server-license-terms serve-local --without-connection-token --telemetry-level "${TELEMETRY_LEVEL}" > "${LOG_PATH}" 2>&1 & From b8ebdc911f989fffdf68bd53ca2a96fb502ecae4 Mon Sep 17 00:00:00 2001 From: Michael Brewer Date: Thu, 2 May 2024 01:00:25 -0700 Subject: [PATCH 09/21] Update vscode-web/run.sh Co-authored-by: Muhammad Atif Ali --- vscode-web/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vscode-web/run.sh b/vscode-web/run.sh index c6b606de..dbe80e97 100755 --- a/vscode-web/run.sh +++ b/vscode-web/run.sh @@ -13,7 +13,7 @@ fi run_vscode_web() { echo "👷 Running $VSCODE_SERVER serve-local --port ${PORT} --host 127.0.0.1 --accept-server-license-terms serve-local --without-connection-token --telemetry-level ${TELEMETRY_LEVEL} in the background..." echo "Check logs at ${LOG_PATH}!" - "$VSCODE_SERVER" serve-local "$EXTENSION_ARG" --port "${PORT}" --host 127.0.0.1 --accept-server-license-terms serve-local --without-connection-token --telemetry-level "${TELEMETRY_LEVEL}" > "${LOG_PATH}" 2>&1 & + "$VSCODE_WEB" serve-local "$EXTENSION_ARG" --port "${PORT}" --host 127.0.0.1 --accept-server-license-terms serve-local --without-connection-token --telemetry-level "${TELEMETRY_LEVEL}" > "${LOG_PATH}" 2>&1 & } # Check if the settings file exists... From 1462d66ca0e894c8afae63b1945dc9275ba32669 Mon Sep 17 00:00:00 2001 From: Michael Brewer Date: Thu, 2 May 2024 01:00:31 -0700 Subject: [PATCH 10/21] Update vscode-web/run.sh Co-authored-by: Muhammad Atif Ali --- vscode-web/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vscode-web/run.sh b/vscode-web/run.sh index dbe80e97..de870e31 100755 --- a/vscode-web/run.sh +++ b/vscode-web/run.sh @@ -2,7 +2,7 @@ BOLD='\033[0;1m' EXTENSIONS=("${EXTENSIONS}") -VSCODE_SERVER="${INSTALL_PREFIX}/bin/code-server" +VSCODE_WEB="${INSTALL_PREFIX}/bin/code-server" # Set extension directory EXTENSION_ARG="" From a367517883adcb7fbb8f8f98bcf806c45b946ab0 Mon Sep 17 00:00:00 2001 From: Michael Brewer Date: Thu, 2 May 2024 01:00:41 -0700 Subject: [PATCH 11/21] Update vscode-web/main.tf Co-authored-by: Muhammad Atif Ali --- vscode-web/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vscode-web/main.tf b/vscode-web/main.tf index b5382f10..131aeb86 100644 --- a/vscode-web/main.tf +++ b/vscode-web/main.tf @@ -149,7 +149,7 @@ resource "coder_script" "vscode-web" { precondition { condition = !var.offline || !var.use_cached - error_message = "Offline and Use Cached can not be used together" + error_message = "offline and use_cached can not be used together" } } } From 9bb4b820430fb8c613019a8c7b66be6d710698ac Mon Sep 17 00:00:00 2001 From: Michael Brewer Date: Thu, 2 May 2024 01:00:47 -0700 Subject: [PATCH 12/21] Update vscode-web/run.sh Co-authored-by: Muhammad Atif Ali --- vscode-web/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vscode-web/run.sh b/vscode-web/run.sh index de870e31..b58552a4 100755 --- a/vscode-web/run.sh +++ b/vscode-web/run.sh @@ -27,7 +27,7 @@ fi if [ -f "$VSCODE_SERVER" ]; then if [ "${OFFLINE}" = true ] || [ "${USE_CACHED}" = true ]; then echo "🥳 Found a copy of VS Code Web" - run_code_server + run_vscode_web exit 0 fi fi From b74a61c0ebaff14b1b3a4a11932e7a14f32b3397 Mon Sep 17 00:00:00 2001 From: Michael Brewer Date: Thu, 2 May 2024 01:00:56 -0700 Subject: [PATCH 13/21] Update vscode-web/run.sh Co-authored-by: Muhammad Atif Ali --- vscode-web/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vscode-web/run.sh b/vscode-web/run.sh index b58552a4..6bbc06d5 100755 --- a/vscode-web/run.sh +++ b/vscode-web/run.sh @@ -91,7 +91,7 @@ if [ "${AUTO_INSTALL_EXTENSIONS}" = true ]; then printf "🧩 Installing extensions from %s/.vscode/extensions.json...\n" "$WORKSPACE_DIR" extensions=$(jq -r '.recommendations[]' "$WORKSPACE_DIR"/.vscode/extensions.json) for extension in $extensions; do - $VSCODE_SERVER "$EXTENSION_ARG" --install-extension "$extension" --force + $VSCODE_WEB "$EXTENSION_ARG" --install-extension "$extension" --force done fi fi From b00b47c5f2e9ea3a111d3be083570a7c726830ba Mon Sep 17 00:00:00 2001 From: Michael Brewer Date: Thu, 2 May 2024 01:01:01 -0700 Subject: [PATCH 14/21] Update vscode-web/run.sh Co-authored-by: Muhammad Atif Ali --- vscode-web/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vscode-web/run.sh b/vscode-web/run.sh index 6bbc06d5..17a2603d 100755 --- a/vscode-web/run.sh +++ b/vscode-web/run.sh @@ -11,7 +11,7 @@ if [ -n "${EXTENSIONS_DIR}" ]; then fi run_vscode_web() { - echo "👷 Running $VSCODE_SERVER serve-local --port ${PORT} --host 127.0.0.1 --accept-server-license-terms serve-local --without-connection-token --telemetry-level ${TELEMETRY_LEVEL} in the background..." + echo "👷 Running $VSCODE_WEB serve-local --port ${PORT} --host 127.0.0.1 --accept-server-license-terms serve-local --without-connection-token --telemetry-level ${TELEMETRY_LEVEL} in the background..." echo "Check logs at ${LOG_PATH}!" "$VSCODE_WEB" serve-local "$EXTENSION_ARG" --port "${PORT}" --host 127.0.0.1 --accept-server-license-terms serve-local --without-connection-token --telemetry-level "${TELEMETRY_LEVEL}" > "${LOG_PATH}" 2>&1 & } From 0605dce911743f72e0f01cb4926004f78327c8dc Mon Sep 17 00:00:00 2001 From: Michael Brewer Date: Thu, 2 May 2024 01:03:55 -0700 Subject: [PATCH 15/21] Update main.tf --- vscode-web/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vscode-web/main.tf b/vscode-web/main.tf index 131aeb86..b5382f10 100644 --- a/vscode-web/main.tf +++ b/vscode-web/main.tf @@ -149,7 +149,7 @@ resource "coder_script" "vscode-web" { precondition { condition = !var.offline || !var.use_cached - error_message = "offline and use_cached can not be used together" + error_message = "Offline and Use Cached can not be used together" } } } From 3c0c133611f6c6e569b876f3639836338e721a4b Mon Sep 17 00:00:00 2001 From: Michael Brewer Date: Thu, 2 May 2024 01:11:48 -0700 Subject: [PATCH 16/21] Update run.sh --- vscode-web/run.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vscode-web/run.sh b/vscode-web/run.sh index 17a2603d..8c0ea90d 100755 --- a/vscode-web/run.sh +++ b/vscode-web/run.sh @@ -24,7 +24,7 @@ if [ ! -f ~/.vscode-server/data/Machine/settings.json ]; then fi # Check if vscode-server is already installed for offline or cached mode -if [ -f "$VSCODE_SERVER" ]; then +if [ -f "$VSCODE_WEB" ]; then if [ "${OFFLINE}" = true ] || [ "${USE_CACHED}" = true ]; then echo "🥳 Found a copy of VS Code Web" run_vscode_web @@ -69,7 +69,7 @@ for extension in "$${EXTENSIONLIST[@]}"; do continue fi printf "🧩 Installing extension $${CODE}$extension$${RESET}...\n" - output=$($VSCODE_SERVER "$EXTENSION_ARG" --install-extension "$extension" --force) + output=$($VSCODE_WEB "$EXTENSION_ARG" --install-extension "$extension" --force) if [ $? -ne 0 ]; then echo "Failed to install extension: $extension: $output" exit 1 From 4c016da032a7798972ed2b63794a67d654db01c5 Mon Sep 17 00:00:00 2001 From: Michael Brewer Date: Thu, 2 May 2024 17:45:09 -0700 Subject: [PATCH 17/21] Update main.tf Co-authored-by: Asher --- vscode-web/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vscode-web/main.tf b/vscode-web/main.tf index b5382f10..377ac018 100644 --- a/vscode-web/main.tf +++ b/vscode-web/main.tf @@ -99,7 +99,7 @@ variable "settings" { variable "offline" { type = bool - description = "Just run VS Code Web in the background, don't fetch it from GitHub" + description = "Just run VS Code Web in the background, don't fetch it from the internet." default = false } From 2d43c2cd20b8b77aabfc290541abd97b4ae85549 Mon Sep 17 00:00:00 2001 From: Michael Brewer Date: Thu, 2 May 2024 17:47:30 -0700 Subject: [PATCH 18/21] Update main.tf Co-authored-by: Asher --- vscode-web/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vscode-web/main.tf b/vscode-web/main.tf index 377ac018..084f8306 100644 --- a/vscode-web/main.tf +++ b/vscode-web/main.tf @@ -105,7 +105,7 @@ variable "offline" { variable "use_cached" { type = bool - description = "Uses cached copy of VS Code Web in the background, otherwise fetches it from internet" + description = "Uses cached copy of VS Code Web in the background, otherwise fetches it from internet." default = false } From ffe91145c356076c862422bb1ae3107ff7f00b97 Mon Sep 17 00:00:00 2001 From: Michael Brewer Date: Thu, 2 May 2024 17:48:08 -0700 Subject: [PATCH 19/21] Update run.sh Co-authored-by: Asher --- vscode-web/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vscode-web/run.sh b/vscode-web/run.sh index 8c0ea90d..2a8c12e0 100755 --- a/vscode-web/run.sh +++ b/vscode-web/run.sh @@ -11,7 +11,7 @@ if [ -n "${EXTENSIONS_DIR}" ]; then fi run_vscode_web() { - echo "👷 Running $VSCODE_WEB serve-local --port ${PORT} --host 127.0.0.1 --accept-server-license-terms serve-local --without-connection-token --telemetry-level ${TELEMETRY_LEVEL} in the background..." + echo "👷 Running $VSCODE_WEB serve-local $EXTENSIONS_ARG --port ${PORT} --host 127.0.0.1 --accept-server-license-terms --without-connection-token --telemetry-level ${TELEMETRY_LEVEL} in the background..." echo "Check logs at ${LOG_PATH}!" "$VSCODE_WEB" serve-local "$EXTENSION_ARG" --port "${PORT}" --host 127.0.0.1 --accept-server-license-terms serve-local --without-connection-token --telemetry-level "${TELEMETRY_LEVEL}" > "${LOG_PATH}" 2>&1 & } From 2d15e4bc0377651df1d1c5feb7fff004562895c7 Mon Sep 17 00:00:00 2001 From: Michael Brewer Date: Thu, 2 May 2024 17:48:20 -0700 Subject: [PATCH 20/21] Update run.sh Co-authored-by: Asher --- vscode-web/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vscode-web/run.sh b/vscode-web/run.sh index 2a8c12e0..cf4aa807 100755 --- a/vscode-web/run.sh +++ b/vscode-web/run.sh @@ -13,7 +13,7 @@ fi run_vscode_web() { echo "👷 Running $VSCODE_WEB serve-local $EXTENSIONS_ARG --port ${PORT} --host 127.0.0.1 --accept-server-license-terms --without-connection-token --telemetry-level ${TELEMETRY_LEVEL} in the background..." echo "Check logs at ${LOG_PATH}!" - "$VSCODE_WEB" serve-local "$EXTENSION_ARG" --port "${PORT}" --host 127.0.0.1 --accept-server-license-terms serve-local --without-connection-token --telemetry-level "${TELEMETRY_LEVEL}" > "${LOG_PATH}" 2>&1 & + "$VSCODE_WEB" serve-local "$EXTENSION_ARG" --port "${PORT}" --host 127.0.0.1 --accept-server-license-terms --without-connection-token --telemetry-level "${TELEMETRY_LEVEL}" > "${LOG_PATH}" 2>&1 & } # Check if the settings file exists... From 10f9f154bc74e6d5b6d9269e1bc09a27cc8f9d8c Mon Sep 17 00:00:00 2001 From: Michael Brewer Date: Thu, 2 May 2024 21:46:10 -0700 Subject: [PATCH 21/21] chore: fix spelling --- vscode-web/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vscode-web/run.sh b/vscode-web/run.sh index cf4aa807..ce8782f5 100755 --- a/vscode-web/run.sh +++ b/vscode-web/run.sh @@ -11,7 +11,7 @@ if [ -n "${EXTENSIONS_DIR}" ]; then fi run_vscode_web() { - echo "👷 Running $VSCODE_WEB serve-local $EXTENSIONS_ARG --port ${PORT} --host 127.0.0.1 --accept-server-license-terms --without-connection-token --telemetry-level ${TELEMETRY_LEVEL} in the background..." + echo "👷 Running $VSCODE_WEB serve-local $EXTENSION_ARG --port ${PORT} --host 127.0.0.1 --accept-server-license-terms --without-connection-token --telemetry-level ${TELEMETRY_LEVEL} in the background..." echo "Check logs at ${LOG_PATH}!" "$VSCODE_WEB" serve-local "$EXTENSION_ARG" --port "${PORT}" --host 127.0.0.1 --accept-server-license-terms --without-connection-token --telemetry-level "${TELEMETRY_LEVEL}" > "${LOG_PATH}" 2>&1 & }