mirror of
https://github.com/simonmichael/hledger.git
synced 2024-11-07 21:15:19 +03:00
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
|
||||
])
|
||||
`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
|
||||
where
|
||||
showwithouttrailingzero = dropWhileEnd (=='.') . dropWhileEnd (=='0') . show
|
||||
|
Loading…
Reference in New Issue
Block a user