aboutsummaryrefslogtreecommitdiff
path: root/ikiwiki.in
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-07-12 23:23:25 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-07-12 23:23:25 -0400
commite3c0e4977449de2eec36e254a7e131693ba2f822 (patch)
tree09fd42fb4d3328a36dd3622a47cb449b68f35149 /ikiwiki.in
parente4e3d7e2d4195bcd22c467522719c9c6dd39216b (diff)
downloadikiwiki-e3c0e4977449de2eec36e254a7e131693ba2f822.tar
ikiwiki-e3c0e4977449de2eec36e254a7e131693ba2f822.tar.gz
only htmlize errors when cgi is actually running
Diffstat (limited to 'ikiwiki.in')
-rwxr-xr-xikiwiki.in7
1 files changed, 5 insertions, 2 deletions
diff --git a/ikiwiki.in b/ikiwiki.in
index e0a591824..cc3f210b5 100755
--- a/ikiwiki.in
+++ b/ikiwiki.in
@@ -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;