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 /IkiWiki | |
parent | 1d6eb13e2b3b7cf60f26ae4c5b631b0e65e34c5f (diff) | |
download | ikiwiki-8c8aa3fe479ccbcc60d82b1efa38df2edf38fc15.tar ikiwiki-8c8aa3fe479ccbcc60d82b1efa38df2edf38fc15.tar.gz |
Detect plugins with a broken getsetup and warn.
Diffstat (limited to 'IkiWiki')
-rw-r--r-- | IkiWiki/Setup.pm | 5 |
1 files changed, 5 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; |