coder / sail

Deprecated: Instant, pre-configured VS Code development environments.
https://sail.dev
MIT License
627 stars 36 forks source link

Path compatibility fixes to improve WSL compatibility #211

Closed deansheather closed 5 years ago

deansheather commented 5 years ago

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