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

Extract .nu-env tests and more granularity #3078

Merged
merged 1 commit into from Feb 19, 2021

Conversation

andrasio
Copy link
Member

The autoenv logic mutates environment variables in the running session as it operates and decides what to do for trusted directories containing .nu-env files. Few of the ways to interact with it were all in a single test function.

We separate out all the ways that were done in the single test function to document it better. This will greatly help once we start refactoring our way out from setting environment variables this way to just setting them to Scope.

This is part of an on-going effort to keep variables (PATH and ENV) in our Scope and rely on it for everything related to variables.

We expect to move away from setting (std::*) envrironment variables in the current running process. This is non-trivial since we need to handle cases from vars coming in from the outside world, prioritize, and also compare to the ones we have both stored in memory and in configuration files.

Also to send out our in-memory (in Scope) variables properly to external programs once we no longer rely on std::env vars from the running process.

@andrasio andrasio force-pushed the documentacion branch 2 times, most recently from a00ff66 to 49f5bfe Compare February 19, 2021 00:46
The autoenv logic mutates environment variables in the running session as
it operates and decides what to do for trusted directories containing `.nu-env`
files. Few of the ways to interact with it were all in a single test function.

We separate out all the ways that were done in the single test function to document
 it better. This will greatly help once we start refactoring our way out from setting
 environment variables this way to just setting them to `Scope`.

This is part of an on-going effort to keep variables (`PATH` and `ENV`)
in our `Scope` and rely on it for everything related to variables.

We expect to move away from setting (`std::*`) envrironment variables in the current
running process. This is non-trivial since we need to handle cases from vars
coming in from the outside world, prioritize, and also compare to the ones
we have both stored in memory and in configuration files.

Also to send out our in-memory (in `Scope`) variables properly to external
programs once we no longer rely on `std::env` vars from the running process.
@andrasio andrasio merged commit 7dc1d6a into nushell:main Feb 19, 2021
@andrasio andrasio deleted the documentacion branch February 19, 2021 01:24
@fdncred fdncred added this to Release 0.28 in Release PRs Feb 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Release PRs
  
Release 0.28
Development

Successfully merging this pull request may close these issues.

None yet

1 participant