Merge pull request #90 from coder/code-server-extensions

code-server: fix multiple-extension installation
pull/91/head
Stephen Kirby 2 years ago committed by GitHub
commit b6ec1d85a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -63,6 +63,18 @@ module "settings" {
} }
``` ```
### Install multiple extensions
Just run code-server in the background, don't fetch it from GitHub:
```hcl
module "settings" {
source = "https://registry.coder.com/modules/code-server"
agent_id = coder_agent.example.id
extensions = [ "dracula-theme.theme-dracula", "ms-azuretools.vscode-docker" ]
}
```
### Offline Mode ### Offline Mode
Just run code-server in the background, don't fetch it from GitHub: Just run code-server in the background, don't fetch it from GitHub:

@ -25,7 +25,8 @@ printf "🥳 code-server has been installed in ${INSTALL_PREFIX}\n\n"
CODE_SERVER="${INSTALL_PREFIX}/bin/code-server" CODE_SERVER="${INSTALL_PREFIX}/bin/code-server"
# Install each extension... # Install each extension...
for extension in "$${EXTENSIONS[@]}"; do IFS=',' read -r -a EXTENSIONLIST <<< "$${EXTENSIONS}"
for extension in "$${EXTENSIONLIST[@]}"; do
if [ -z "$extension" ]; then if [ -z "$extension" ]; then
continue continue
fi fi
@ -46,4 +47,4 @@ fi
echo "👷 Running code-server in the background..." echo "👷 Running code-server in the background..."
echo "Check logs at ${LOG_PATH}!" echo "Check logs at ${LOG_PATH}!"
$CODE_SERVER --auth none --port ${PORT} >${LOG_PATH} 2>&1 & $CODE_SERVER --auth none --port ${PORT} >${LOG_PATH} 2>&1 &
Loading…
Cancel
Save