diff options
author | Joey Hess <joey@kitenet.net> | 2013-04-23 11:41:52 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-04-23 11:41:52 -0400 |
commit | 94530a0ed9f7fbbb0c604cff6be68f9fd04862b6 (patch) | |
tree | 5449a2f25f23d9c9b661c94dfdd1f0cd754a2dc1 | |
parent | e8b1ae6a5f74e6f9d562f8bef63f284f3881df79 (diff) |
strip newlines in programfile
Indeed, ignore lines after the first.
Use might create it with echo..
-rw-r--r-- | Config/Files.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Config/Files.hs b/Config/Files.hs index 357481ca6..e51e8a747 100644 --- a/Config/Files.hs +++ b/Config/Files.hs @@ -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" |