Thanks to visit codestin.com
Credit goes to github.com

Skip to content
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
merged 1 commit into from
Jun 11, 2019

Conversation

deansheather
Copy link
Member

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

- 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
@deansheather deansheather requested a review from nathanpotter June 7, 2019 05:48
@nathanpotter nathanpotter merged commit 8195b9e into master Jun 11, 2019
@nathanpotter nathanpotter deleted the wsl-compatibility branch June 11, 2019 15:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants