Path changes in various locations to help make very basic WSL support possible. Since Docker is running in Windows, it doesn't understand WSL paths so this PR changes any instances of hardcoded paths in a backwards compatible way.
The code-server cache path was changed to use os.TempDir() to find the temporary directory rather than a hardcoded /tmp.
The code-server config and extension bind mounts were updated to use a function, which uses the old value on Linux and a different value on Darwin. If the VSCODE_CONFIG_DIR or VSCODE_EXTENSIONS_DIR env vars are present, it will use those instead. This functionality was adapted from sshcode.
There is still a lengthy list of workarounds to make WSL work properly, which are outlined in #210.
Changes
Add VSCODE_CONFIG_DIR and VSCODE_EXTENSIONS_DIR environment
variables to change the bind mounted code-server and config and
extensions directories
Change the default bind mounted code-server config and extension
paths on darwin
Change the code-server cache path to use os.TempDir() instead of
hard-coded /tmp
Change the resolvePath() function to be compatible with shells
Path changes in various locations to help make very basic WSL support possible. Since Docker is running in Windows, it doesn't understand WSL paths so this PR changes any instances of hardcoded paths in a backwards compatible way.
The code-server cache path was changed to use
os.TempDir()
to find the temporary directory rather than a hardcoded/tmp
.The code-server config and extension bind mounts were updated to use a function, which uses the old value on Linux and a different value on Darwin. If the
VSCODE_CONFIG_DIR
orVSCODE_EXTENSIONS_DIR
env vars are present, it will use those instead. This functionality was adapted from sshcode.There is still a lengthy list of workarounds to make WSL work properly, which are outlined in #210.
Changes
VSCODE_CONFIG_DIR
andVSCODE_EXTENSIONS_DIR
environment variables to change the bind mounted code-server and config and extensions directories