version: Avoid error message when entire output is not read
Sponsored-by: Dartmouth College's Datalad project
This commit is contained in:
parent
39f33a9988
commit
0f89d221bd
4 changed files with 32 additions and 1 deletions
|
@ -78,5 +78,6 @@ showRawVersion = do
|
|||
putStr BuildInfo.packageversion
|
||||
hFlush stdout -- no newline, so flush
|
||||
|
||||
-- Ignore failure to write so that this command can eg be piped to head.
|
||||
vinfo :: String -> String -> IO ()
|
||||
vinfo k v = putStrLn $ k ++ ": " ++ v
|
||||
vinfo k v = void $ tryIO $ putStrLn $ k ++ ": " ++ v
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue