From 94530a0ed9f7fbbb0c604cff6be68f9fd04862b6 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 23 Apr 2013 11:41:52 -0400 Subject: 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(-) (limited to 'Config') 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" -- cgit v1.2.3