This repository was archived by the owner on Apr 28, 2020. It is now read-only.
Path compatibility fixes to improve WSL compatibility#211
Merged
nathanpotter merged 1 commit intomasterfrom Jun 11, 2019
Merged
Path compatibility fixes to improve WSL compatibility#211nathanpotter merged 1 commit intomasterfrom
nathanpotter merged 1 commit intomasterfrom
Conversation
- 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
nathanpotter
approved these changes
Jun 11, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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_DIRorVSCODE_EXTENSIONS_DIRenv 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_DIRandVSCODE_EXTENSIONS_DIRenvironmentvariables to change the bind mounted code-server and config and
extensions directories
paths on darwin
hard-coded /tmp