We need to restore %ENV of script/lei in case another
lei client has a different %ENV than what daemon has.
---
lib/PublicInbox/LeiUp.pm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/PublicInbox/LeiUp.pm b/lib/PublicInbox/LeiUp.pm
index be476427..a16117c9 100644
--- a/lib/PublicInbox/LeiUp.pm
+++ b/lib/PublicInbox/LeiUp.pm
@@ -55,13 +55,14 @@ sub up1 ($$) {
sub up1_redispatch {
my ($lei, $out, $op_p) = @_;
my $l = bless { %$lei }, ref($lei);
- $l->{opt} = { %{$l->{opt}} };
+ $l->{opt} = { %{$l->{opt}} }; # deep copy
delete $l->{sock}; # do not close
$l->{''} = $op_p; # daemon only ($l => $lei => script/lei)
# make close($l->{1}) happy in lei->dclose
open my $fh, '>&', $l->{1} or return $l->child_error(0, "dup: $!");
local $PublicInbox::LEI::current_lei = $l;
+ local %ENV = %{$l->{env}};
$l->{1} = $fh;
eval {
$l->qerr("# updating $out");
--
unsubscribe: one-click, see List-Unsubscribe header
archive: https://public-inbox.org/meta/