mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 04:09:12 +00:00
fix
This commit is contained in:
@@ -161,12 +161,16 @@ async function nextTask(label, action) {
|
||||
try {
|
||||
process.stdout.write(`${chalk.yellow('•')} ${label}`);
|
||||
await action();
|
||||
if (process.stdout.clearLine) process.stdout.clearLine();
|
||||
if (process.stdout.cursorTo) process.stdout.cursorTo(0);
|
||||
if (process.stdout.isTTY) {
|
||||
process.stdout.clearLine();
|
||||
process.stdout.cursorTo(0);
|
||||
}
|
||||
process.stdout.write(`${chalk.green('✔')} ${label}\n`);
|
||||
} catch (err) {
|
||||
if (process.stdout.clearLine) process.stdout.clearLine();
|
||||
if (process.stdout.cursorTo) process.stdout.cursorTo(0);
|
||||
if (process.stdout.isTTY) {
|
||||
process.stdout.clearLine();
|
||||
process.stdout.cursorTo(0);
|
||||
}
|
||||
process.stdout.write(`${chalk.red('✘')} ${label}\n\n`);
|
||||
if (err.stdout) process.stdout.write(`${chalk.red(err.stdout)}\n`);
|
||||
if (err.stderr) process.stdout.write(`${chalk.red(err.stderr)}\n`);
|
||||
|
||||
Reference in New Issue
Block a user