mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-29 13:23:53 +08:00
Collapse a weirdly structured clause in env.cpp
This commit is contained in:
parent
a597b0e6e1
commit
372291ad02
|
@ -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 New Issue
Block a user