You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
inproc: NIX_USER_CONF_FILES is set into the environment and never restored #39
Opening one in-process session changes the environment of the whole process
permanently.
Evidence
inproc/_impl.py:259-260 assigns os.environ[NIX_USER_CONF_FILES_ENV].
Nothing restores it.
rpc/worker/_worker.py:250-251 does the same, and there it is correct and
documented: the variable is an input that Nix reads in loadConfFile, and the
worker process is disposable.
In the in-process engine the assignment outlives the session and affects any
later use of Nix in the same process.
Scope
Restore the previous value in Session.close. If the maintainer prefers to
keep the side effect, state it in the docstring of the nix_conf parameter
instead. The restore is preferred.
Files
inproc/_impl.py.
Acceptance criteria
The variable holds its value from before the session after Session.close().
Compatibility
This is a deliberate behaviour change for inproc. No caller in this repository
or in pynix relies on the variable surviving the close.
Activity
fix(inproc): put NIX_USER_CONF_FILES back when the session closes