Skip to content

Commit 76d050e

Browse files
committed
Fix glass-democlient --service option
It didn't work
1 parent 37e0b67 commit 76d050e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

glean/glass/tools/Glean/Glass/Test/DemoClient.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ readService = do
109109
hostPort <- Text.pack <$> readerAsk
110110
case Text.breakOn ":" hostPort of
111111
(_, "") -> fail "Not a valid host:port"
112-
(host, portStr) -> case textToInt portStr of
112+
(host, portStr) -> case textToInt (Text.drop 1 portStr) of
113113
Left _ -> fail ("Not a valid port: " <> show portStr)
114114
Right port -> return (HostPort host (fromIntegral port))
115115

@@ -152,13 +152,13 @@ defCfg = def { processingTimeout = Just 15000 }
152152

153153
type GlassM p a = forall c . ClientChannel c => ThriftM p c GlassService a
154154

155-
svc :: ThriftService GlassService
156-
svc = mkThriftService defService defCfg
155+
svc :: Service -> ThriftService GlassService
156+
svc s = mkThriftService s defCfg
157157

158158
main :: IO ()
159159
main = Glean.withOptions options $ \Options{..} ->
160160
withEventBaseDataplane $ \evp -> do
161-
res <- runThrift evp svc $
161+
res <- runThrift evp (svc optHost) $
162162
case optCommand of
163163
List repo path -> runListSymbols repo path
164164
Describe sym -> runDescribe sym

0 commit comments

Comments
 (0)