Alex
Alex
CCoder.com
Created by Alex on 2/21/2024 in #help
Pre-installing VS code extensions in coder workspace
I would like to pre-install VS code extensions in a workspace template so that everyone on my team will automatically have them when they create a new workspace. It's possible to install extensions via the command line with the code command, but this command is not available in the startup script for the coder agent. I tried the following hacky solution:
CODE_SERVER_PATH=$(ls /root/.vscode-server/bin/*/bin/code-server)
$CODE_SERVER_PATH --install-extension charliermarsh.ruff
CODE_SERVER_PATH=$(ls /root/.vscode-server/bin/*/bin/code-server)
$CODE_SERVER_PATH --install-extension charliermarsh.ruff
This works some of the time, but sometimes the coder-server binary is not found at that location. Is there a better way to do what I'm after?
3 replies