imp:demo: improve error message when asciinema fails
This commit is contained in:
parent
d8021ef754
commit
31ecc9f4f2
@ -161,7 +161,10 @@ runAsciinemaPlay speed idlelimit content args =
|
|||||||
,args
|
,args
|
||||||
])
|
])
|
||||||
`catchIOError` \err -> do
|
`catchIOError` \err -> do
|
||||||
putStrLn $ "There was a problem. Is asciinema installed ?\n" <> show err -- (or PowerSession on Windows)
|
putStrLn $ "\n" <> show err
|
||||||
|
putStrLn "Error: running asciinema failed. Trying 'asciinema --version':"
|
||||||
|
callProcess "asciinema" ["--version"] `catchIOError` \_ ->
|
||||||
|
putStrLn "This also failed. Check that asciinema is installed in your PATH."
|
||||||
exitFailure
|
exitFailure
|
||||||
where
|
where
|
||||||
showwithouttrailingzero = dropWhileEnd (=='.') . dropWhileEnd (=='0') . show
|
showwithouttrailingzero = dropWhileEnd (=='.') . dropWhileEnd (=='0') . show
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user