diff options
author | Joey Hess <joey@kitenet.net> | 2013-03-04 13:19:05 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-03-04 13:19:05 -0400 |
commit | 8c8aa3fe479ccbcc60d82b1efa38df2edf38fc15 (patch) | |
tree | 0f107c0361acc83b3681d06335a3d5f2744b93df | |
parent | 1d6eb13e2b3b7cf60f26ae4c5b631b0e65e34c5f (diff) | |
download | ikiwiki-8c8aa3fe479ccbcc60d82b1efa38df2edf38fc15.tar ikiwiki-8c8aa3fe479ccbcc60d82b1efa38df2edf38fc15.tar.gz |
Detect plugins with a broken getsetup and warn.
-rw-r--r-- | IkiWiki/Setup.pm | 5 | ||||
-rw-r--r-- | debian/changelog | 1 |
2 files changed, 6 insertions, 0 deletions
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 <joeyh@debian.org> Fri, 15 Feb 2013 17:23:12 -0400 |