From 1d6eb13e2b3b7cf60f26ae4c5b631b0e65e34c5f Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 4 Mar 2013 13:00:33 -0400 Subject: Add missing plugin section, and deal with missing sections with a warning. --- IkiWiki/Setup.pm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'IkiWiki/Setup.pm') diff --git a/IkiWiki/Setup.pm b/IkiWiki/Setup.pm index 48f3d4634..881e8a9d5 100644 --- a/IkiWiki/Setup.pm +++ b/IkiWiki/Setup.pm @@ -223,6 +223,10 @@ sub commented_dump ($$) { my $setup=$pair->[1]; my %s=@{$setup}; my $section=$s{plugin}->{section}; + if (! defined $section) { + print STDERR "warning: missing section in $plugin\n"; + $section="other"; + } push @{$section_plugins{$section}}, $plugin; if (@{$section_plugins{$section}} == 1) { push @ret, "", $indent.("#" x 70), "$indent# $section plugins", -- cgit v1.2.3