Fix environment passung to eval'ed commands.
PR: bin/6577 Submitted by: Anatoly Vorobey <mellon@pobox.com> Approved by: silence amoung other sh experts
This commit is contained in:
parent
e6b52a8395
commit
b2acf8878e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=60592
@ -850,6 +850,7 @@ evalcommand(cmd, flags, backcmd)
|
||||
exitstatus = (*builtinfunc[cmdentry.u.index])(argc, argv);
|
||||
flushall();
|
||||
cmddone:
|
||||
cmdenviron = NULL;
|
||||
out1 = &output;
|
||||
out2 = &errout;
|
||||
freestdout();
|
||||
|
@ -667,7 +667,7 @@ evalvar(p, flag)
|
||||
set = varisset(var, varflags & VSNUL);
|
||||
val = NULL;
|
||||
} else {
|
||||
val = lookupvar(var);
|
||||
val = bltinlookup(var, 1);
|
||||
if (val == NULL || ((varflags & VSNUL) && val[0] == '\0')) {
|
||||
val = NULL;
|
||||
set = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user