Skip to content

fix: preserve environment variables after self_elevate()#290

Merged
NotAShelf merged 1 commit intonix-community:masterfrom
cornservant:master
May 18, 2025
Merged

fix: preserve environment variables after self_elevate()#290
NotAShelf merged 1 commit intonix-community:masterfrom
cornservant:master

Conversation

@cornservant
Copy link
Copy Markdown

Closes #289

Some environment variables such as NH_NO_CHECKS modify the behaviour of commands that require elevated privileges such as nh clean all. This fix allows all environment variables to be preserved after the call to self_elevate().

@NotAShelf
Copy link
Copy Markdown
Member

LGTM. Hoping there aren't any side-effects that I cannot think of right now.

@NotAShelf NotAShelf merged commit d065dc9 into nix-community:master May 18, 2025
2 checks passed
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

Successfully merging this pull request may close these issues.

environment variables like NH_NO_CHECKS not preserved after self_elevate()

2 participants