Fix $? at the first command of a function. The previous exit status was saved
twice and thus lost.
This commit is contained in:
parent
954a204664
commit
fd291bd5c3
@ -791,6 +791,7 @@ evalcommand(union node *cmd, int flags, struct backcmd *backcmd)
|
||||
for (sp = varlist.list ; sp ; sp = sp->next)
|
||||
mklocal(sp->text);
|
||||
funcnest++;
|
||||
exitstatus = oexitstatus;
|
||||
if (flags & EV_TESTED)
|
||||
evaltree(cmdentry.u.func, EV_TESTED);
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user