don't test host in configure

That'll fail when building offline.
This commit is contained in:
Joey Hess 2012-10-30 19:28:46 -04:00
parent 0cf152b88b
commit 60fba9097a
2 changed files with 4 additions and 8 deletions

View file

@ -16,7 +16,6 @@ module Utility.SRV (
lookupSRV,
) where
import qualified Build.SysConfig
import Utility.Process
import Utility.Exception
import Utility.PartialPrelude
@ -86,12 +85,10 @@ lookupSRV = lookupSRVHost
#endif
lookupSRVHost :: SRV -> IO [HostPort]
lookupSRVHost (SRV srv)
| Build.SysConfig.host = catchDefaultIO [] $
parseSrvHost <$> readProcessEnv "host" ["-t", "SRV", "--", srv]
-- clear environment, to avoid LANG affecting output
(Just [])
| otherwise = return []
lookupSRVHost (SRV srv) = catchDefaultIO [] $
parseSrvHost <$> readProcessEnv "host" ["-t", "SRV", "--", srv]
-- clear environment, to avoid LANG affecting output
(Just [])
parseSrvHost :: String -> [HostPort]
parseSrvHost = orderHosts . catMaybes . map parse . lines