avoid exception when curl exits nonzero (due to eg, bad domain name)
This commit is contained in:
parent
1b3da6a089
commit
16387edd00
1 changed files with 2 additions and 1 deletions
|
@ -77,7 +77,8 @@ exists url uo = case parseURIRelaxed url of
|
||||||
Nothing -> dne
|
Nothing -> dne
|
||||||
| otherwise -> if Build.SysConfig.curl
|
| otherwise -> if Build.SysConfig.curl
|
||||||
then do
|
then do
|
||||||
output <- readProcess "curl" $ toCommand curlparams
|
output <- catchDefaultIO "" $
|
||||||
|
readProcess "curl" $ toCommand curlparams
|
||||||
case lastMaybe (lines output) of
|
case lastMaybe (lines output) of
|
||||||
Just ('2':_:_) -> return (True, extractsize output)
|
Just ('2':_:_) -> return (True, extractsize output)
|
||||||
_ -> dne
|
_ -> dne
|
||||||
|
|
Loading…
Reference in a new issue