summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-04-14 14:44:19 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-04-14 14:44:19 -0400
commit86a86ad53f59caf9c6e6b0ba2ce5ca1f27660521 (patch)
treef6313370ee3eac0667677faee3e5e4faf0e6f54c /Build
parent34abcdb647d665a85a5607b0b4441224aae655df (diff)
put in workaround for strange version of git on the autobuilder
Diffstat (limited to 'Build')
-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