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.
@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
@mrbrownt mrbrownt deleted the fix-docker-in-wsl2 branch January 29, 2020 16:19
@pluma
Copy link
Contributor

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
Development

Successfully merging this pull request may close these issues.

Incorrect behavior when running in a Docker container in WSL2
3 participants