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 for real #168

Merged
merged 2 commits into from Feb 1, 2020
Merged

Fix Docker in WSL2 for real #168

merged 2 commits into from Feb 1, 2020

Conversation

pluma
Copy link
Contributor

@pluma pluma commented Jan 30, 2020

The module exports a function, not a boolean, so the check for its value would always pass. This breaks WSL (again). We don't need to call the function more than once to find out if we're in docker, so this just calls it right on require.

Fixes the bug introduced in #164.

<snark>This wouldn't have happened with TypeScript. ;)</snark>

The module exports a function, not a boolean, so the check for its value would always pass. This breaks WSL (again). We don't need to call the function more than once to find out if we're in docker, so this just calls it right on require.
@pluma
Copy link
Contributor Author

pluma commented Jan 30, 2020

/cc @mrbrownt who created the original PR

index.js Outdated Show resolved Hide resolved
@pluma
Copy link
Contributor Author

pluma commented Jan 30, 2020

I've changed the PR so it's invoking on use rather than on import. I've tested the changes locally and WSL now works again.

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.

None yet

2 participants