Use T.strip to strip whitespace from around uri
commit129a0996ad3a6cd53b559b0420697fa024513380
authorTom Smalley <tfsmalley@gmail.com>
dateThu 31 May 2018, 15:54 (8 years ago)
parentee1c092
lib/run/src/Obelisk/Run.hs+1−1
@@ -49,7 +49,7 @@ run port backend frontend = do
4949
5050getConfigRoute :: IO (Maybe URI)
5151getConfigRoute = get "common/route" >>= \case
52− Just r -> case URI.mkURI $ fromMaybe r $ T.stripSuffix "\n" r of
52+ Just r -> case URI.mkURI $ T.strip r of
5353 Just route -> pure $ Just route
5454 Nothing -> do
5555 putStrLn $ "Route is invalid: " <> show r