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

Add default version info flag/parameter for wsl command #5985

Open
dominik-ba opened this issue Sep 25, 2020 · 3 comments
Open

Add default version info flag/parameter for wsl command #5985

dominik-ba opened this issue Sep 25, 2020 · 3 comments
Labels

Comments

@dominik-ba
Copy link

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 😅.

@therealkenc
Copy link
Collaborator

wsl.exe --status as of some recent Insider build.

image

@dominik-ba
Copy link
Author

wsl.exe --status as of some recent Insider build.

image

this needs some extended parsing but better than nothing :)

@therealkenc
Copy link
Collaborator

therealkenc commented Sep 28, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants