fix: [CDE-555]: fix correctly iterate over list of extensions for gitspace (#3597)

<img width="1083" alt="Screenshot 2024-12-12 at 10 47 03 AM"
src="https://github.com/user-attachments/assets/442dee2f-f541-4656-ba27-a28aeab42b5a"
/>


* fix: [CDE-555]: fix correctly iterate over list of extensions for
gitspace.

(cherry picked from commit 1e18e289d8)
pull/3599/head
Ansuman Satapathy 2024-12-12 17:08:08 +05:30 committed by GitHub
parent f463f8f7f5
commit 6fd23fd03e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 3 deletions

View File

@ -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