summaryrefslogtreecommitdiff
path: root/Config
diff options
context:
space:
mode:
Diffstat (limited to 'Config')
-rw-r--r--Config/Files.hs5
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"