load plugins before printing messages
authorJoey Hess <joey@kodama.kitenet.net>
Thu, 8 May 2008 20:08:02 +0000 (16:08 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Thu, 8 May 2008 20:08:02 +0000 (16:08 -0400)
This allows plugins to getopt and change what is done before an incorrect
line is printed.

IkiWiki/Render.pm
IkiWiki/Setup/Standard.pm

index 8591731dc3a21cff9009d32f0b8ccdf4447f7c40..eb01a422764b8236a88f8443165e36e753f0b922 100644 (file)
@@ -508,8 +508,6 @@ sub refresh () { #{{{
 } #}}}
 
 sub commandline_render () { #{{{
-       loadplugins();
-       checkconfig();
        lockwiki();
        loadindex();
        unlockwiki();
index 87db648e0accc2c177f2f55e8c6dc712863a0326..fb542be20d80dcca05ac7560b35c17e1932f3b32 100644 (file)
@@ -63,11 +63,15 @@ sub setup_standard {
                        $config{$c}=undef;
                }
        }
+       
+       loadplugins();
+       checkconfig();
 
        if ($config{render}) {
                commandline_render();
        }
-       elsif (! $config{refresh}) {
+
+       if (! $config{refresh}) {
                $config{rebuild}=1;
                debug(gettext("rebuilding wiki.."));
        }
@@ -75,8 +79,6 @@ sub setup_standard {
                debug(gettext("refreshing wiki.."));
        }
 
-       loadplugins();
-       checkconfig();
        lockwiki();
        loadindex();
        refresh();