Giter Club home page Giter Club logo

Comments (5)

yuk7 avatar yuk7 commented on July 30, 2024

You can get WSL version (1 or 2) of instance:
Launcher.exe get --wsl-version

from wsldl.

lucasvc avatar lucasvc commented on July 30, 2024

I meant to retrieve the version from the running Linux.

As I pointed in the question (made by myself) there is a not clear environment variable and the Kernel uname options, but none are official nor reliable.

So I don't know if Launcher can add environment variables before starting the WSL command line, adding that --wsl-version in a new environment variable named WSL_VERSION or similar.

If my C knowledge would not be so rusty I could set a PR, sorry :(

from wsldl.

yuk7 avatar yuk7 commented on July 30, 2024

ah, sorry, I understood.
You are right.
Guessing the WSL version from uname is not accurate.

Now, we don't provide wsl version information to environment variable.

from wsldl.

yuk7 avatar yuk7 commented on July 30, 2024

I think it is difficult to provide that function.
Users don't always launch using our launcher.

from wsldl.

lucasvc avatar lucasvc commented on July 30, 2024

Users don't always launch using our launcher.

Yes, ideally should be that Microsoft provides it (I probably will open an issue later).
Or you mean that not everyone that has the Launcher use it as "executable" and they use the wsl command?

UPDATE: SuperUser question has a good workaround, so feel free to close this.

from wsldl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.