Coder Social home page Coder Social logo

Consider passing Windows environment variables down into WSL so the user can set environment variables in Windows and imported commands will honor them about powershell-wsl-interop HOT 2 CLOSED

mikebattista avatar mikebattista commented on August 15, 2024
Consider passing Windows environment variables down into WSL so the user can set environment variables in Windows and imported commands will honor them

from powershell-wsl-interop.

Comments (2)

mikebattista avatar mikebattista commented on August 15, 2024

Introduced support via $WslEnvironmentVariables["<NAME>"] = "<VALUE>" rather than try to send all Windows environment variables down.

This neatly contains WSL environment variables separately from Windows environment variables but also avoids conflicting with variables like PATH that are automatically modified and set within WSL.

Furthermore, many Windows environment variables point to absolute paths that would need to be translated to be meaningful within WSL, so opting in variables vs. trying to send them all down avoids the overhead of trying to translate them all every time a command is called when most of them would not be useful.

from powershell-wsl-interop.

mikebattista avatar mikebattista commented on August 15, 2024

Note that if you don't mind cluttering your Windows environment variables or already have some set defined that you'd like to share within WSL, you could also use the WSLENV environment variable.

from powershell-wsl-interop.

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.