Is there a way to have this package check if wsl1 or wsl2?
BerserkerGaruk opened this issue · comments
mscherer commented
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.
Sindre Sorhus commented
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()
.