mirror of
https://github.com/pesde-pkg/tooling.git
synced 2025-03-04 02:51:47 +00:00
feat(lib): write progress bars to stderr
This commit is contained in:
parent
13cae3a375
commit
6342b5ca87
2 changed files with 2 additions and 2 deletions
|
@ -281,7 +281,7 @@ function installTool(tool: ToolId, installPath: pathfs.Path): number
|
||||||
if matchingAsset == nil then
|
if matchingAsset == nil then
|
||||||
if _G.interactive then
|
if _G.interactive then
|
||||||
-- Clear the current progress bar line
|
-- Clear the current progress bar line
|
||||||
stdio.write("\x1b[2K\x1b[0G")
|
stdio.ewrite("\x1b[2K\x1b[0G")
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Output warnings
|
-- Output warnings
|
||||||
|
|
|
@ -56,7 +56,7 @@ function ProgressBar.start(self: ProgressBarImpl): ()
|
||||||
while not self.finished do
|
while not self.finished do
|
||||||
for _, spinner in SPINNERS do
|
for _, spinner in SPINNERS do
|
||||||
local stage = self.stages[self.currentStageIndex]
|
local stage = self.stages[self.currentStageIndex]
|
||||||
stdio.write(
|
stdio.ewrite(
|
||||||
`\x1b[2K\x1b[0G{stdio.color("cyan")}{spinner} {stage.message}{stdio.color("reset")}{string.rep(
|
`\x1b[2K\x1b[0G{stdio.color("cyan")}{spinner} {stage.message}{stdio.color("reset")}{string.rep(
|
||||||
" ",
|
" ",
|
||||||
MAX_MESSAGE_LENGTH - #stage.message
|
MAX_MESSAGE_LENGTH - #stage.message
|
||||||
|
|
Loading…
Add table
Reference in a new issue