]> sipb.mit.edu Git - ikiwiki.git/blobdiff - ikiwiki.in
avoid hardlinking files owned by others
[ikiwiki.git] / ikiwiki.in
index e0a59182422ae0d2aaa1b69d15fa3463f144d9c8..cc3f210b5ef5f345390bda811d0478965827dfc2 100755 (executable)
@@ -100,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: $@");
                }
@@ -123,7 +123,10 @@ sub main () { #{{{
        }
        elsif ($config{cgi}) {
                require IkiWiki::CGI;
-               cgi();
+               eval {cgi()};
+               if ($@) {
+                       cgierror($@);
+               }
        }
        elsif ($config{render}) {
                require IkiWiki::Render;