about summary refs log tree commit homepage
path: root/script/public-inbox-index
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-04-19 07:41:22 +0000
committerEric Wong <e@80x24.org>2019-05-06 19:12:15 +0000
commitce18b29d175ef5f01f05d59c95bcf8e0cd40e611 (patch)
tree576188ca61f8a2533e0d153baf7d66472a8921c8 /script/public-inbox-index
parente1ed79d1e99e2c58b3edb370e60904cf656dd823 (diff)
downloadpublic-inbox-ce18b29d175ef5f01f05d59c95bcf8e0cd40e611.tar.gz
This can help users track down the source of warnings
when presented with imperfect emails.

While we're at it, make the __WARN__ callback in t/v2writable.t
a no-op since we don't check for warnings, there.
Diffstat (limited to 'script/public-inbox-index')
-rwxr-xr-xscript/public-inbox-index3
1 files changed, 3 insertions, 0 deletions
diff --git a/script/public-inbox-index b/script/public-inbox-index
index 5adb6e74..2f810a56 100755
--- a/script/public-inbox-index
+++ b/script/public-inbox-index
@@ -85,6 +85,9 @@ sub index_dir {
                                 }
                         }
                 }
+                local $SIG{__WARN__} = sub {
+                        print STDERR $v2w->{current_info}, ': ', @_;
+                };
                 $v2w->index_sync({ reindex => $reindex, prune => $prune });
         } else {
                 my $s = PublicInbox::SearchIdx->new($repo, 1);