make programPath return FilePath not Maybe FilePath
Looking at the few current callers, it's ok to have programPath throw an exception, in the unusual case where it cannot find git-annex.
This commit is contained in:
parent
ad1f4a7f1c
commit
b9275b65f9
4 changed files with 17 additions and 20 deletions
|
@ -62,8 +62,13 @@ readProgramFile = do
|
|||
( return p
|
||||
, ifM (inPath cmd)
|
||||
( return cmd
|
||||
, error $ "cannot find git-annex program in PATH or in the location listed in " ++ programfile
|
||||
, cannotFindProgram
|
||||
)
|
||||
)
|
||||
where
|
||||
cmd = "git-annex"
|
||||
|
||||
cannotFindProgram :: IO a
|
||||
cannotFindProgram = do
|
||||
f <- programFile
|
||||
error $ "cannot find git-annex program in PATH or in the location listed in " ++ f
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue