better readProcess
This commit is contained in:
parent
1db7d27a45
commit
9fc94d780b
6 changed files with 21 additions and 9 deletions
|
@ -32,7 +32,7 @@ configkey = annexConfig "uuid"
|
|||
{- Generates a UUID. There is a library for this, but it's not packaged,
|
||||
- so use the command line tool. -}
|
||||
genUUID :: IO UUID
|
||||
genUUID = gen . lines <$> readProcess command params []
|
||||
genUUID = gen . lines <$> readProcess command params
|
||||
where
|
||||
gen [] = error $ "no output from " ++ command
|
||||
gen (l:_) = toUUID l
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue