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 Docker in WSL2 #164

Merged
merged 1 commit into from Jan 29, 2020
Merged

Fix Docker in WSL2 #164

merged 1 commit into from Jan 29, 2020

Conversation

@mrbrownt
Copy link
Contributor

@mrbrownt mrbrownt commented Jan 20, 2020

When running the new experimental docker for desktop (Windows) in WSL2 open assumes that is has access to windows .exe files, which does not work in the context of docker. This uses the is-docker lib to revert to linux behavior in this case but still run things correctly if you're using WSL 1 or 2 outside of docker.

Fixes #157

When running the new experimental docker for desktop (Windows) in WSL2 open assumes that is has access to windows .exe files, which does not work in the context of docker. This uses the is-docker lib to revert to linux behavior in this case but still run things correctly if you're using WSL 1 or 2 outside of docker.
@mrbrownt mrbrownt requested a review from sindresorhus Jan 28, 2020
@sindresorhus sindresorhus changed the title Fix docker in wsl2 Fix Docker in WSL2 Jan 29, 2020
@sindresorhus sindresorhus merged commit 417c326 into sindresorhus:master Jan 29, 2020
1 check passed
1 check passed
@travis-ci
Travis CI - Pull Request Build Passed
Details
@mrbrownt mrbrownt deleted the mrbrownt:fix-docker-in-wsl2 branch Jan 29, 2020
@pluma
Copy link
Contributor

@pluma pluma commented Jan 30, 2020

There's a bug in this PR: isDocker is a function, so the check will always return truthy. This completely breaks open on WSL as it will fall back to xdg-open.

I'll create a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

3 participants