Skip to content

Commit

Permalink
Better clear
Browse files Browse the repository at this point in the history
  • Loading branch information
JrMasterModelBuilder committed May 4, 2024
1 parent cbde838 commit 22a0573
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions bin/download-flash-cn.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ async function main() {

{
const clear = process.stdout.isTTY
? '\x1B[F'.repeat(resources.length)
? '\x1B[F\x1B[2K'.repeat(resources.length)
: '';
const update = first => {
let output = first ? '' : clear;
Expand All @@ -118,7 +118,7 @@ async function main() {
hashes
} = resource;
const status = hashes
? 'COMPLETE'
? 'DONE'
: `%${(progress * 100).toFixed(2)}`;
output += `${name}: ${status}\n`;
}
Expand Down
4 changes: 2 additions & 2 deletions bin/download-harman-air-runtime.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ async function main() {

{
const clear = process.stdout.isTTY
? '\x1B[F'.repeat(resources.length)
? '\x1B[F\x1B[2K'.repeat(resources.length)
: '';
const update = first => {
let output = first ? '' : clear;
Expand All @@ -104,7 +104,7 @@ async function main() {
hashes
} = resource;
const status = hashes
? 'COMPLETE'
? 'DONE'
: `%${(progress * 100).toFixed(2)}`;
output += `${name}: ${status}\n`;
}
Expand Down
4 changes: 2 additions & 2 deletions bin/download-harman-air-sdk.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ async function main() {

{
const clear = process.stdout.isTTY
? '\x1B[F'.repeat(resources.length)
? '\x1B[F\x1B[2K'.repeat(resources.length)
: '';
const update = first => {
let output = first ? '' : clear;
Expand All @@ -103,7 +103,7 @@ async function main() {
hashes
} = resource;
const status = hashes
? 'COMPLETE'
? 'DONE'
: `%${(progress * 100).toFixed(2)}`;
output += `${name}: ${status}\n`;
}
Expand Down

0 comments on commit 22a0573

Please sign in to comment.