]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
fetch: fix missing chdir arg for error reporting
authorEric Wong <e@80x24.org>
Tue, 26 Sep 2023 07:44:38 +0000 (07:44 +0000)
committerEric Wong <e@80x24.org>
Tue, 26 Sep 2023 21:02:44 +0000 (21:02 +0000)
We need to run `git config -l' in the epoch directory which
failed to get the proper config listing.  This went unnoticed
because it doesn't affect any known users and was only found
during code inspection for waitpid usage cleanups.

lib/PublicInbox/Fetch.pm

index f93eeebeae29f85c0fd20374f42724f0a0941447..8f3a87e22d799f74971fbd617f1772f0b94118e8 100644 (file)
@@ -131,8 +131,9 @@ sub do_fetch { # main entry point
                                $epoch = $nr;
                        } else {
                                warn "W: $edir missing remote.*.url\n";
-                               my $pid = spawn([qw(git config -l)], undef,
-                                       { 1 => $lei->{2}, 2 => $lei->{2} });
+                               my $o = { -C => $edir };
+                               $o->{1} = $o->{2} = $lei->{2};
+                               my $pid = spawn([qw(git config -l)], undef, $o);
                                waitpid($pid, 0);
                                $lei->child_error($?) if $?;
                        }