From 9c7737d056f832824812086373a13922dd08a0c5 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 31 Dec 2020 13:51:42 +0000 Subject: spawn: move run_die here from PublicInbox::Import It seems like a more logical place for it, but we'll favor the newly-added xsys_e() in tests for BAIL_OUT use. --- script/public-inbox-init | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'script') diff --git a/script/public-inbox-init b/script/public-inbox-init index 7ac77830..85d14377 100755 --- a/script/public-inbox-init +++ b/script/public-inbox-init @@ -185,17 +185,20 @@ $ibx->init_inbox(0, $skip_epoch, $skip_artnum); # needed for git prior to v2.1.0 umask(0077) if defined $perm; +require PublicInbox::Spawn; +PublicInbox::Spawn->import(qw(run_die)); + foreach my $addr (@address) { next if $seen{lc($addr)}; - PublicInbox::Import::run_die([@x, "--add", "$pfx.address", $addr]); + run_die([@x, "--add", "$pfx.address", $addr]); } -PublicInbox::Import::run_die([@x, "$pfx.url", $http_url]); -PublicInbox::Import::run_die([@x, "$pfx.inboxdir", $inboxdir]); +run_die([@x, "$pfx.url", $http_url]); +run_die([@x, "$pfx.inboxdir", $inboxdir]); if (defined($indexlevel)) { - PublicInbox::Import::run_die([@x, "$pfx.indexlevel", $indexlevel]); + run_die([@x, "$pfx.indexlevel", $indexlevel]); } -PublicInbox::Import::run_die([@x, "$pfx.newsgroup", $ng]) if $ng ne ''; +run_die([@x, "$pfx.newsgroup", $ng]) if $ng ne ''; # needed for git prior to v2.1.0 if (defined $perm) { -- cgit v1.2.3-24-ge0c7