From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id D47A21F62E for ; Tue, 15 Jan 2019 20:06:25 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] index: allow working on unconfigured inboxes, again Date: Tue, 15 Jan 2019 20:06:25 +0000 Message-Id: <20190115200625.4741-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: --- script/public-inbox-index | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script/public-inbox-index b/script/public-inbox-index index 73ad9bc..2ae9275 100755 --- a/script/public-inbox-index +++ b/script/public-inbox-index @@ -14,7 +14,7 @@ my $usage = "public-inbox-index REPO_DIR"; use PublicInbox::Config; my $config = eval { PublicInbox::Config->new } || eval { warn "public-inbox unconfigured for serving, indexing anyways...\n"; - {} + undef; }; eval { require PublicInbox::SearchIdx }; if ($@) { @@ -73,7 +73,7 @@ if (@ARGV) { sub usage { print STDERR "Usage: $usage\n"; exit 1 } usage() unless @dirs; -$config->each_inbox(sub { +defined($config) and $config->each_inbox(sub { my ($ibx) = @_; for my $i (0..$#dirs) { -- EW