Open dominik-ba opened 3 years ago
wsl.exe --status
as of some recent Insider build.
wsl.exe --status
as of some recent Insider build.
this needs some extended parsing but better than nothing :)
this needs some extended parsing but better than nothing :)
Yeah. That state of affairs needs to be broached at some point. The wsl.exe
output is (in general) internationalized and presumably subject to change, which means scraping the output is not tenable as an API. But it is better than nothing.
The --status
command is also pretty slow, since it is doing a lot more than fetching the default version. If you feel motivated, add a rider over in #5098 for --set-default-version
with no parameters to output the current version.
Background: Currently you can configure the default wsl version with the wsl command. But unless you know by heart what you did on your machine there is no possibility to know what version currently is the default.
Feature request: I would like to have a flag/parameter I can provide to the wsl command that prints out the default version.
This is especially very helpful if you use automation, dotfiles, puppet, you-name-it to configure your workstation automatically.
Ps: I wasn't able to see if this was already requested because searching for version and flag or parameter just aren't the best search keywords 😅.