]> Sergey Matveev's repositories - public-inbox.git/commitdiff
qspawn: drop lineno from command failure warning
authorEric Wong <e@80x24.org>
Tue, 24 Jan 2023 09:49:30 +0000 (09:49 +0000)
committerEric Wong <e@80x24.org>
Tue, 24 Jan 2023 10:07:28 +0000 (10:07 +0000)
git, cgit, or any other command failing isn't an error
we can do anything about in qspawn, so don't have Perl
emit line number info and needlessly pollute logs.

lib/PublicInbox/Qspawn.pm
t/solver_git.t

index cc81a4cd6d7c6d13657719513a57d688eb0a95b9..5e4fd5cb8541a2a8202d188ae1fd73c88fe64188 100644 (file)
@@ -85,7 +85,7 @@ sub finalize ($) {
                if (my $dst = $self->{qsp_err}) {
                        $$dst .= $$dst ? " $err" : "; $err";
                }
-               warn "@{$self->{cmd}}: $err" if !$self->{-quiet};
+               warn "@{$self->{cmd}}: $err\n" if !$self->{-quiet};
        }
 
        my ($env, $qx_cb, $qx_arg, $qx_buf) =
index 06d75816a59d8cc895fcd62f1837265060234e46..122cf888eae7c31f634a13f9547de953a2492422 100644 (file)
@@ -336,7 +336,7 @@ EOF
                        open $fh, '>', "$tmpdir/stderr.log" or xbail $!;
                        ok($s =~ s/^fatal: your current branch.*?\n//sm,
                                'got current branch warning');
-                       ok($s =~ s/^.*? exit status=[1-9]+ .*?\n//sm,
+                       ok($s =~ s/^.*? exit status=[1-9]+\n\z//sm,
                                'got exit status warning');
                        is($s, '', 'no unexpected warnings on empty coderepo');
                }