Commit 6825bb9c authored by Vaibhav Sagar's avatar Vaibhav Sagar

IHaskell.Eval.Evaluate: don't output HTML on shell command failure

parent aa155731
...@@ -709,11 +709,7 @@ evalCommand publish (Directive ShellCmd cmd) state = wrapExecution state $ ...@@ -709,11 +709,7 @@ evalCommand publish (Directive ShellCmd cmd) state = wrapExecution state $
ExitSuccess -> return $ Display [plain out] ExitSuccess -> return $ Display [plain out]
ExitFailure code -> do ExitFailure code -> do
let errMsg = "Process exited with error code " ++ show code let errMsg = "Process exited with error code " ++ show code
htmlErr = printf "<span class='err-msg'>%s</span>" errMsg return $ Display [plain $ out ++ "\n" ++ errMsg]
return $ Display
[ plain $ out ++ "\n" ++ errMsg
, html $ printf "<span class='mono'>%s</span>" out ++ htmlErr
]
loop loop
-- This is taken largely from GHCi's info section in InteractiveUI. -- This is taken largely from GHCi's info section in InteractiveUI.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment