mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
Collapse a weirdly structured clause in env.cpp
This commit is contained in:
parent
a597b0e6e1
commit
372291ad02
1 changed files with 1 additions and 4 deletions
|
@ -900,12 +900,9 @@ maybe_t<env_var_t> env_stack_t::get(const wcstring &key, env_mode_flags_t mode)
|
|||
env = vars_stack().next_scope_to_search(env);
|
||||
}
|
||||
}
|
||||
|
||||
if (!search_universal) return none();
|
||||
|
||||
// Okay, we couldn't find a local or global var given the requirements. If there is a matching
|
||||
// universal var return that.
|
||||
if (uvars()) {
|
||||
if (search_universal && uvars()) {
|
||||
auto var = uvars()->get(key);
|
||||
if (var && (var->exports() ? search_exported : search_unexported)) {
|
||||
return var;
|
||||
|
|
Loading…
Reference in a new issue