From 000c87f510bee6085030e084041d595146984a26 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 31 Aug 2008 22:11:59 -0400 Subject: [PATCH] don't fail if %config is not set --- IkiWiki/Setup.pm | 2 +- ...i::Setup::load__40____41___broken_outside_ikiwiki__63__.mdwn | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/IkiWiki/Setup.pm b/IkiWiki/Setup.pm index f8bb664c4..77afdd608 100644 --- a/IkiWiki/Setup.pm +++ b/IkiWiki/Setup.pm @@ -33,7 +33,7 @@ sub merge ($) { # Merge setup into existing config and untaint. my %setup=%{shift()}; - if (exists $setup{add_plugins}) { + if (exists $setup{add_plugins} && exists $config{add_plugins}) { push @{$setup{add_plugins}}, @{$config{add_plugins}}; } if (exists $setup{exclude}) { diff --git a/doc/bugs/IkiWiki::Setup::load__40____41___broken_outside_ikiwiki__63__.mdwn b/doc/bugs/IkiWiki::Setup::load__40____41___broken_outside_ikiwiki__63__.mdwn index b92a96838..e1e29f0a4 100644 --- a/doc/bugs/IkiWiki::Setup::load__40____41___broken_outside_ikiwiki__63__.mdwn +++ b/doc/bugs/IkiWiki::Setup::load__40____41___broken_outside_ikiwiki__63__.mdwn @@ -16,3 +16,5 @@ This is in ikiwiki 2.62.1. I think this call used to work in 2.54 (when you firs >> It seems that `%config = IkiWiki::defaultsetup();IkiWiki::Setup::load("file");` >> works (after `use IkiWiki; use IkiWiki::Setup;`). Of course the other api >> is nicer. + +[[done]], sorry for trouble --[[Joey]] -- 2.26.2