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

This commit is contained in:
Vaibhav Sagar 2020-11-23 02:33:37 +11:00
parent aa15573158
commit 6825bb9cf5

View File

@ -709,11 +709,7 @@ evalCommand publish (Directive ShellCmd cmd) state = wrapExecution state $
ExitSuccess -> return $ Display [plain out]
ExitFailure code -> do
let errMsg = "Process exited with error code " ++ show code
htmlErr = printf "<span class='err-msg'>%s</span>" errMsg
return $ Display
[ plain $ out ++ "\n" ++ errMsg
, html $ printf "<span class='mono'>%s</span>" out ++ htmlErr
]
return $ Display [plain $ out ++ "\n" ++ errMsg]
loop
-- This is taken largely from GHCi's info section in InteractiveUI.