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

Is there a way to have this package check if wsl1 or wsl2? #6

Closed
BerserkerGaruk opened this issue Dec 11, 2019 · 1 comment
Closed

Comments

@BerserkerGaruk
Copy link

Is there a way to use this package and check if the current runtime is WSL1 or WSL2? I'm wondering because in WSL 1 docker has some buggy work-around in order to get working, but in WSL 2 it works closer to an actual docker install through the docker wsl preview. In this instance I'd like to be able to see if i'm running in wsl1 or wsl2 as it would allow me to act appropriately.

@sindresorhus
Copy link
Owner

I'm not interested in adding separate checks in this package, but if you look at #3, you can see that you can differentiate them by the casing of os.release().

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

No branches or pull requests

2 participants