From f3ef6fe6a713bbae9f22c59662aad51ca9b89147 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 23 Apr 2013 11:41:52 -0400 Subject: [PATCH] strip newlines in programfile Indeed, ignore lines after the first. Use might create it with echo.. --- Config/Files.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Config/Files.hs b/Config/Files.hs index 357481ca67..e51e8a747e 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"