Skip to content

Cannot set environment variables with env: #9

Answered by Vampire
skirmess asked this question in Q&A
Discussion options

You must be logged in to vote

This is normal WSL behavior.
Almost no environment variables are forwarded from Windows to WSL by default.
You need to use WSLENV to configure which environment variables are forwarded and how they should be converted (path, list of paths, plain, ...).
In your example if you add WSLENV: TEST_ENV as environment variable, it runs through as expected.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@skirmess
Comment options

@Vampire
Comment options

Answer selected by skirmess
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #8 on July 12, 2021 12:05.