From 093ee6def5f805f39f9f375fc2c9863040a46013 Mon Sep 17 00:00:00 2001 From: Mahmoud Al-Qudsi Date: Thu, 10 Nov 2022 21:23:20 -0600 Subject: [PATCH] Drop global variable shadowing warning on universal var unset When unsetting, the scope indicates the scope that was *removed* not set, so the warning is incorrectly triggered. If anything, the confusion is now removed or we emit a warning that the variable is still present in another scope (but don't do that!). Closes #9338. --- src/builtins/set.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/builtins/set.cpp b/src/builtins/set.cpp index fe2fc7469..1adae234b 100644 --- a/src/builtins/set.cpp +++ b/src/builtins/set.cpp @@ -664,8 +664,6 @@ static int builtin_set_erase(const wchar_t *cmd, set_cmd_opts_t &opts, int argc, // This is cheesy, but I don't expect this to be checked often. if (retval != STATUS_CMD_OK) { ret = retval; - } else { - warn_if_uvar_shadows_global(cmd, opts, split->varname, streams, parser); } } }