File tree 1 file changed +7
-3
lines changed 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -358,15 +358,19 @@ runAction opts = do
358
358
-> return n
359
359
_ -> fail $ " bad port number " ++ show str
360
360
361
+ checkHostURI :: ServerConfig -> Maybe String -> Int -> IO URI
361
362
checkHostURI defaults Nothing port = do
362
363
let guessURI = confHostUri defaults
363
- Just authority = uriAuthority guessURI
364
+ case uriAuthority guessURI of
365
+ Nothing -> fail " No URI Authority"
366
+ Just authority -> let
364
367
portStr | port == 80 = " "
365
368
| otherwise = ' :' : show port
366
369
guessURI' = guessURI { uriAuthority = Just authority { uriPort = portStr } }
367
- lognotice verbosity $ " Guessing public URI as " ++ show guessURI'
370
+ in do
371
+ lognotice verbosity $ " Guessing public URI as " ++ show guessURI'
368
372
++ " \n (you can override with the --base-uri= flag)"
369
- return guessURI'
373
+ return guessURI'
370
374
371
375
checkHostURI _ (Just str) _ = case parseAbsoluteURI str of
372
376
Nothing -> fail $ " Cannot parse as a URI: " ++ str ++ " \n "
You can’t perform that action at this time.
0 commit comments