From 8c8aa3fe479ccbcc60d82b1efa38df2edf38fc15 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 4 Mar 2013 13:19:05 -0400 Subject: [PATCH] Detect plugins with a broken getsetup and warn. --- IkiWiki/Setup.pm | 5 +++++ debian/changelog | 1 + 2 files changed, 6 insertions(+) diff --git a/IkiWiki/Setup.pm b/IkiWiki/Setup.pm index 881e8a9d5..453d19670 100644 --- a/IkiWiki/Setup.pm +++ b/IkiWiki/Setup.pm @@ -172,6 +172,11 @@ sub getsetup () { my @s=eval { $IkiWiki::hooks{getsetup}{$plugin}{call}->() }; next unless @s; + if (scalar(@s) % 2 != 0) { + print STDERR "warning: plugin $plugin has a broken getsetup; ignoring\n"; + next; + } + # set default section value (note use of shared # hashref between array and hash) my %s=@s; diff --git a/debian/changelog b/debian/changelog index 85acaf530..54e7c9024 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ ikiwiki (3.20130213) UNRELEASED; urgency=low * Allow dots in directive parameter names. (tango) * Add missing plugin section, and deal with missing sections with a warning. + * Detect plugins with a broken getsetup and warn. -- Joey Hess Fri, 15 Feb 2013 17:23:12 -0400