mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-31 12:21:19 -03:00
Correctly un-export an env var when it is shadowed
Prior to this fix, if you exported a variable in one scope
and then unexported it in the next, it would remain exported.
Example:
set -gx VAR 1
function foo; set -l VAR; env; end
foo
Here 'VAR' would be exported to 'env' because we failed to
notice that the env var is shadowed by an unexported variable.
This occurred at env var computation time, not in env_set!
Fixes #2132
This commit is contained in:
@@ -16,6 +16,8 @@ Test 15 pass
|
||||
Foo change detected
|
||||
Foo change detected
|
||||
Test 16 pass
|
||||
__fish_test_env17=UNSHADOWED
|
||||
SHADOWED
|
||||
Testing Universal Startup
|
||||
1
|
||||
1
|
||||
|
||||
Reference in New Issue
Block a user