Fix build failure when wget is not installed.

This commit is contained in:
Joey Hess 2015-01-15 15:42:15 -04:00
parent 8872f2fbdb
commit a92737c8b9
3 changed files with 10 additions and 1 deletions

View file

@ -15,6 +15,7 @@ import Utility.Process
import Utility.SafeCommand
import Utility.ExternalSHA
import Utility.Env
import Utility.Exception
import qualified Git.Version
import Utility.DottedVersion
@ -106,7 +107,8 @@ checkWgetQuietProgress = Config "wgetquietprogress" . BoolConfig
<$> getWgetVersion
getWgetVersion :: IO (Maybe DottedVersion)
getWgetVersion = extract <$> readProcess "wget" ["--version"]
getWgetVersion = catchDefaultIO Nothing $
extract <$> readProcess "wget" ["--version"]
where
extract s = case lines s of
[] -> Nothing