Hiding of environment variables (#362)

* Remember environment variables from previous scope

* Re-introduce env var hiding

Right now, hiding decls is broken

* Re-introduce hidden field of import patterns

All tests pass now.

* Remove/Address tests TODOs

* Fix test typo; Report hiding error

* Add a few more tests

* Fix wrong expected test result
This commit is contained in:
Jakub Žádník
2021-11-30 08:14:05 +02:00
committed by GitHub
parent 21ddfc61f4
commit c17e1473db
9 changed files with 232 additions and 56 deletions

View File

@ -126,7 +126,7 @@ fn main() -> Result<()> {
let mut stack = nu_protocol::engine::Stack::new();
for (k, v) in std::env::vars() {
stack.env_vars.insert(k, v);
stack.add_env_var(k, v);
}
// Set up our initial config to start from
@ -170,7 +170,7 @@ fn main() -> Result<()> {
let mut stack = nu_protocol::engine::Stack::new();
for (k, v) in std::env::vars() {
stack.env_vars.insert(k, v);
stack.add_env_var(k, v);
}
// Set up our initial config to start from