]> sipb.mit.edu Git - ikiwiki.git/blobdiff - ikiwiki.in
avoid hardlinking files owned by others
[ikiwiki.git] / ikiwiki.in
index 9d1f6b52077b06e09f5bf7ec97b363c0c17941fb..cc3f210b5ef5f345390bda811d0478965827dfc2 100755 (executable)
@@ -29,6 +29,7 @@ sub getconfig () { #{{{
                        "render=s" => \$config{render},
                        "wrappers!" => \$config{wrappers},
                        "usedirs!" => \$config{usedirs},
+                       "prefix-directives!" => \$config{prefix_directives},
                        "getctime" => \$config{getctime},
                        "numbacklinks=i" => \$config{numbacklinks},
                        "rcs=s" => \$config{rcs},
@@ -99,7 +100,7 @@ sub getconfig () { #{{{
        else {
                # wrapper passes a full config structure in the environment
                # variable
-               eval possibly_foolish_untaint($ENV{WRAPPED_OPTIONS});
+               eval {possibly_foolish_untaint($ENV{WRAPPED_OPTIONS})};
                if ($@) {
                        error("WRAPPED_OPTIONS: $@");
                }
@@ -121,9 +122,11 @@ sub main () { #{{{
                gen_wrapper();
        }
        elsif ($config{cgi}) {
-               loadindex();
                require IkiWiki::CGI;
-               cgi();
+               eval {cgi()};
+               if ($@) {
+                       cgierror($@);
+               }
        }
        elsif ($config{render}) {
                require IkiWiki::Render;