Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix workspace and remote path mapping #137

Merged
merged 4 commits into from
Aug 25, 2022

Conversation

skoro
Copy link
Contributor

@skoro skoro commented Jul 26, 2022

This PR fixes two cases when working with Hack lang projects on Windows environment.

  1. A Hack lang project is cloned locally on the file system, e.g. d:\projects\hack-app.
  2. A Hack lang project is cloned inside WSL environment.

In both cases there will be wrong mapping between a local workspace path and remote one.

In the first case the Windows directory separators are used in the path:

in the src/Utils.ts
file.toString() = "file:///c%3A/Users/user/Documents/Projects/hacklang/test"
config.remoteWorkspacePath = "c:\Users\user\Documents\Projects\hacklang\test"

In the second, a hostname wsl.localhost is added to the local workspace path:

in the src/Utils.ts:
file.toString() = "file://wsl.localhost/Ubuntu/home/user/git/test"
config.remoteWorkspacePath = "\\wsl.localhost\Ubuntu\home\user\git\test"

To fix the mapping, the local workspace is converted to an uri path and then replaced by the remoted path which is already converted too.

Closes #136

Fix path mapping on Windows environment.
@CLAassistant
Copy link

CLAassistant commented Jul 26, 2022

CLA assistant check
All committers have signed the CLA.

@PranayAgarwal PranayAgarwal merged commit 15bcce9 into slackhq:master Aug 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Not working on Windows 11 with Docker
3 participants