pytrainer: unpin python 3.10
[NixPkgs.git] / pkgs / shells / bash / fix-pop-var-context-error.patch
blob1b8d5ae20b31d611ad2bf77fb71443b038d5182c
1 Excerpted from <https://git.savannah.gnu.org/cgit/bash.git/commit/?h=devel&id=055a4552c901e43e6a6007f5bc664a33698dbf85>.
3 Original author: Chet Ramey <chet.ramey@case.edu>
5 --- variables.c
6 +++ variables.c
7 @@ -5413,7 +5413,9 @@ pop_var_context ()
8 vcxt = shell_variables;
9 if (vc_isfuncenv (vcxt) == 0)
11 - internal_error (_("pop_var_context: head of shell_variables not a function context"));
12 + /* If we haven't flushed all of the local contexts already, flag an error */
13 + if (shell_variables != global_variables || variable_context > 0)
14 + internal_error (_("pop_var_context: head of shell_variables not a function context"));
15 return;