From 6fd23fd03eed2c11c93100dfde0e50c49a446cda Mon Sep 17 00:00:00 2001 From: Ansuman Satapathy Date: Thu, 12 Dec 2024 17:08:08 +0530 Subject: [PATCH] fix: [CDE-555]: fix correctly iterate over list of extensions for gitspace (#3597) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Screenshot 2024-12-12 at 10 47 03 AM * fix: [CDE-555]: fix correctly iterate over list of extensions for gitspace. (cherry picked from commit 1e18e289d8b7ce70c12f9a94d134f31cd6de0bd1) --- .../orchestrator/template/templates/install_vscode_web.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/gitspace/orchestrator/template/templates/install_vscode_web.sh b/app/gitspace/orchestrator/template/templates/install_vscode_web.sh index a1c0b4ae9..2e77786f3 100644 --- a/app/gitspace/orchestrator/template/templates/install_vscode_web.sh +++ b/app/gitspace/orchestrator/template/templates/install_vscode_web.sh @@ -1,5 +1,5 @@ #!/bin/sh -extensions={{ range .Extensions }}"{{ . }}" {{ end }} +extensions="{{- range $index, $extension := .Extensions }}{{ if $index }} {{ end }}{{ $extension }}{{- end }}" echo "Installing VSCode Web" @@ -7,8 +7,9 @@ curl -fsSL https://code-server.dev/install.sh | sh # Install extensions using code-server CLI and display errors if any for extension in $extensions; do - echo "Installing extension: $extension" - if ! code-server --install-extension "$extension"; then + if code-server --install-extension "$extension"; then + echo "Successfully installed extension: $extension" + else echo "Error installing extension: $extension" >&2 fi done