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

Windows username env fix doesn't work in Windows PowerShell (in contrast to the Command Prompt) #36

Open
timleg002 opened this issue Mar 1, 2022 · 2 comments

Comments

@timleg002
Copy link

Any of the provided fixes, set USERNAME, even setting a global variable using GUI or using setx doesn't work. Also I don't get why file-defined environment variables don't have a higher precedence than those already present in environment variables.

@Tamnac
Copy link

Tamnac commented Oct 20, 2022

After some hunting around, the following fix works
[System.Environment]::SetEnvironmentVariable('UserName', '', 'Process')

@mcdallas
Copy link

It’s an easy one line fix by replacing the dotenv crate with dotenvs that supports overriding env vars. See mcdallas/gert@1235902

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

No branches or pull requests

3 participants