Detect plugins with a broken getsetup and warn.

master
Joey Hess 2013-03-04 13:19:05 -04:00
parent 1d6eb13e2b
commit 8c8aa3fe47
2 changed files with 6 additions and 0 deletions

View File

@ -172,6 +172,11 @@ sub getsetup () {
my @s=eval { $IkiWiki::hooks{getsetup}{$plugin}{call}->() }; my @s=eval { $IkiWiki::hooks{getsetup}{$plugin}{call}->() };
next unless @s; 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 # set default section value (note use of shared
# hashref between array and hash) # hashref between array and hash)
my %s=@s; my %s=@s;

1
debian/changelog vendored
View File

@ -2,6 +2,7 @@ ikiwiki (3.20130213) UNRELEASED; urgency=low
* Allow dots in directive parameter names. (tango) * Allow dots in directive parameter names. (tango)
* Add missing plugin section, and deal with missing sections with a warning. * Add missing plugin section, and deal with missing sections with a warning.
* Detect plugins with a broken getsetup and warn.
-- Joey Hess <joeyh@debian.org> Fri, 15 Feb 2013 17:23:12 -0400 -- Joey Hess <joeyh@debian.org> Fri, 15 Feb 2013 17:23:12 -0400