diff options
-rw-r--r-- | IkiWiki.pm | 6 | ||||
-rwxr-xr-x | ikiwiki | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm index b5707195b..2face7082 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -104,6 +104,12 @@ sub loadplugins () { #{{{ error("Failed to load plugin $mod: $@"); } } + run_hooks(getopt => sub { shift->() }); + if (grep /^-/, @ARGV) { + print STDERR "Unknown option: $_\n" + foreach grep /^-/, @ARGV; + usage(); + } } #}}} sub error ($) { #{{{ @@ -69,12 +69,6 @@ sub getconfig () { #{{{ if (! $config{setup}) { loadplugins(); - run_hooks(getopt => sub { shift->() }); - if (grep /^-/, @ARGV) { - print STDERR "Unknown option: $_\n" - foreach grep /^-/, @ARGV; - usage(); - } usage() unless @ARGV == 2; $config{srcdir} = possibly_foolish_untaint(shift @ARGV); $config{destdir} = possibly_foolish_untaint(shift @ARGV); |