This repository was archived by the owner on Apr 28, 2020. It is now read-only.
Path compatibility fixes to improve WSL compatibility #211
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
environmentvariables to change the bind mounted code-server and config and
extensions directories
paths on darwin
hard-coded /tmp