Skip to content

Commit b6ec1d8

Browse files
authored
Merge pull request coder#90 from coder/code-server-extensions
code-server: fix multiple-extension installation
2 parents 0068642 + eaf6fae commit b6ec1d8

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

code-server/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,18 @@ module "settings" {
6363
}
6464
```
6565

66+
### Install multiple extensions
67+
68+
Just run code-server in the background, don't fetch it from GitHub:
69+
70+
```hcl
71+
module "settings" {
72+
source = "https://registry.coder.com/modules/code-server"
73+
agent_id = coder_agent.example.id
74+
extensions = [ "dracula-theme.theme-dracula", "ms-azuretools.vscode-docker" ]
75+
}
76+
```
77+
6678
### Offline Mode
6779

6880
Just run code-server in the background, don't fetch it from GitHub:

code-server/run.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ printf "🥳 code-server has been installed in ${INSTALL_PREFIX}\n\n"
2525
CODE_SERVER="${INSTALL_PREFIX}/bin/code-server"
2626

2727
# Install each extension...
28-
for extension in "$${EXTENSIONS[@]}"; do
28+
IFS=',' read -r -a EXTENSIONLIST <<< "$${EXTENSIONS}"
29+
for extension in "$${EXTENSIONLIST[@]}"; do
2930
if [ -z "$extension" ]; then
3031
continue
3132
fi
@@ -46,4 +47,4 @@ fi
4647

4748
echo "👷 Running code-server in the background..."
4849
echo "Check logs at ${LOG_PATH}!"
49-
$CODE_SERVER --auth none --port ${PORT} >${LOG_PATH} 2>&1 &
50+
$CODE_SERVER --auth none --port ${PORT} >${LOG_PATH} 2>&1 &

0 commit comments

Comments
 (0)