Skip to content

Commit e812c30

Browse files
authored
Merge pull request #5290 from sellout/transcript-stanza-counter
Improve transcript runner output
2 parents 3202e61 + 8137f57 commit e812c30

File tree

1 file changed

+15
-8
lines changed
  • unison-cli/src/Unison/Codebase/Transcript

1 file changed

+15
-8
lines changed

unison-cli/src/Unison/Codebase/Transcript/Runner.hs

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -280,17 +280,24 @@ run isTest verbosity dir stanzas codebase runtime sbRuntime nRuntime ucmVersion
280280
maybeStanza <- atomically (Q.tryDequeue inputQueue)
281281
_ <- liftIO (writeIORef mStanza maybeStanza)
282282
case maybeStanza of
283-
Nothing -> do
284-
liftIO (putStrLn "")
283+
Nothing -> liftIO do
284+
clearCurrentLine
285+
putStrLn "\r✔️ Completed transcript."
285286
pure $ Right QuitI
286-
Just (s, idx) -> do
287+
Just (s, midx) -> do
287288
unless (Verbosity.isSilent verbosity) . liftIO $ do
289+
clearCurrentLine
288290
putStr $
289-
"\r⚙️ Processing stanza "
290-
++ show idx
291-
++ " of "
292-
++ show (length stanzas)
293-
++ "."
291+
maybe
292+
"\r⏩ Skipping non-executable Markdown block."
293+
( \idx ->
294+
"\r⚙️ Processing stanza "
295+
++ show idx
296+
++ " of "
297+
++ show (length stanzas)
298+
++ "."
299+
)
300+
midx
294301
IO.hFlush IO.stdout
295302
either
296303
( \node -> do

0 commit comments

Comments
 (0)