summaryrefslogtreecommitdiff
path: root/Build/Configure.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-04-14 15:35:15 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-04-14 15:35:15 -0400
commit513b3a639796b06828570b6da6b049095abd5b83 (patch)
treeadc204e55854d1d5d4f75689ea17fa9624142872 /Build/Configure.hs
parentcd4304b64943ba55ffc8beac47796affc5405fd8 (diff)
parent1029cba6ac006b34053f3f96cbee9ecafe8cc1ae (diff)
Merge branch 'master' into concurrentprogress
Conflicts: debian/changelog
Diffstat (limited to 'Build/Configure.hs')
-rw-r--r--Build/Configure.hs15
1 files changed, 9 insertions, 6 deletions
diff --git a/Build/Configure.hs b/Build/Configure.hs
index 4498838a1..c90231b29 100644
--- a/Build/Configure.hs
+++ b/Build/Configure.hs
@@ -94,12 +94,15 @@ getUpgradeLocation = do
return $ Config "upgradelocation" $ MaybeStringConfig e
getGitVersion :: Test
-getGitVersion = do
- v <- Git.Version.installed
- let oldestallowed = Git.Version.normalize "1.7.1.0"
- when (v < oldestallowed) $
- error $ "installed git version " ++ show v ++ " is too old! (Need " ++ show oldestallowed ++ " or newer)"
- return $ Config "gitversion" $ StringConfig $ show v
+getGitVersion = go =<< getEnv "FORCE_GIT_VERSION"
+ where
+ go (Just s) = return $ Config "gitversion" $ StringConfig s
+ go Nothing = do
+ v <- Git.Version.installed
+ let oldestallowed = Git.Version.normalize "1.7.1.0"
+ when (v < oldestallowed) $
+ error $ "installed git version " ++ show v ++ " is too old! (Need " ++ show oldestallowed ++ " or newer)"
+ return $ Config "gitversion" $ StringConfig $ show v
checkWgetQuietProgress :: Test
checkWgetQuietProgress = Config "wgetquietprogress" . BoolConfig