avoid unncessary IO
This commit is contained in:
parent
ecf7ef3ff2
commit
52e40970c8
6 changed files with 15 additions and 17 deletions
|
@ -66,10 +66,9 @@ global = do
|
|||
home <- myHomeDir
|
||||
ifM (doesFileExist $ home </> ".gitconfig")
|
||||
( do
|
||||
repo <- Git.Construct.fromUnknown
|
||||
repo' <- withHandle StdoutHandle createProcessSuccess p $
|
||||
hRead repo
|
||||
return $ Just repo'
|
||||
repo <- withHandle StdoutHandle createProcessSuccess p $
|
||||
hRead (Git.Construct.fromUnknown)
|
||||
return $ Just repo
|
||||
, return Nothing
|
||||
)
|
||||
where
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue