fix(lib): only attempt to clear current progress bar if interactive

This commit is contained in:
Erica Marigold 2025-01-22 12:11:53 +05:30
parent f99a4f787d
commit c85c895408
Signed by: DevComp
GPG key ID: 429EF1C337871656

View file

@ -279,7 +279,12 @@ function installTool(tool: ToolId, installPath: pathfs.Path): number
local binaryContents: buffer local binaryContents: buffer
if matchingAsset == nil then if matchingAsset == nil then
if _G.interactive then
-- Clear the current progress bar line
stdio.write("\x1b[2K\x1b[0G") stdio.write("\x1b[2K\x1b[0G")
end
-- Output warnings
warn("Pesde could not find a matching binary for your system") warn("Pesde could not find a matching binary for your system")
warn("Will now attempt to download all binaries and find a matching one") warn("Will now attempt to download all binaries and find a matching one")