diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-07-12 23:23:25 -0400 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-07-12 23:23:25 -0400 |
commit | e3c0e4977449de2eec36e254a7e131693ba2f822 (patch) | |
tree | 09fd42fb4d3328a36dd3622a47cb449b68f35149 /ikiwiki.in | |
parent | e4e3d7e2d4195bcd22c467522719c9c6dd39216b (diff) | |
download | ikiwiki-e3c0e4977449de2eec36e254a7e131693ba2f822.tar ikiwiki-e3c0e4977449de2eec36e254a7e131693ba2f822.tar.gz |
only htmlize errors when cgi is actually running
Diffstat (limited to 'ikiwiki.in')
-rwxr-xr-x | ikiwiki.in | 7 |
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; |