From 9f5a583694396f84056b9d92255bba0197b52bc8 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 10 Jan 2020 09:14:19 +0000 Subject: spawn (and thus popen_rd) die on failure Most spawn and popen_rd callers die on failure to spawn, anyways, and some are missing checks entirely. This saves us a bunch of verbose error-checking code in callers. This also makes popen_rd more consistent, since it already dies on pipe creation failures. --- lib/PublicInbox/Config.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/PublicInbox/Config.pm') diff --git a/lib/PublicInbox/Config.pm b/lib/PublicInbox/Config.pm index cc8c1eaf..56d146c2 100644 --- a/lib/PublicInbox/Config.pm +++ b/lib/PublicInbox/Config.pm @@ -158,7 +158,7 @@ sub git_config_dump { return {} unless -e $file; my @cmd = (qw/git config -z -l/, "--file=$file"); my $cmd = join(' ', @cmd); - my $fh = popen_rd(\@cmd) or die "popen_rd failed for $file: $!\n"; + my $fh = popen_rd(\@cmd); my $rv = config_fh_parse($fh, "\0", "\n"); close $fh or die "failed to close ($cmd) pipe: $?"; $rv; -- cgit v1.2.3-24-ge0c7