strip newlines in programfile

Indeed, ignore lines after the first.

Use might create it with echo..
This commit is contained in:
Joey Hess 2013-04-23 11:41:52 -04:00
parent 2c42e70f6c
commit f3ef6fe6a7

View file

@ -54,4 +54,7 @@ programFile = userConfigFile "program"
readProgramFile :: IO FilePath
readProgramFile = do
programfile <- programFile
catchDefaultIO "git-annex" $ readFile programfile
catchDefaultIO cmd $
fromMaybe cmd . headMaybe . lines <$> readFile programfile
where
cmd = "git-annex"