mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-06 12:57:46 +00:00
[cli] Fix spinner output outside of TTY (#7017)
* Fix spinner output outside of TTY * Use console.log * Fix tests * Revert "Fix tests" This reverts commit 44383eea2dc3bb699d943079d77961ed86fe65d6. * Revert "Use console.log" This reverts commit 251bd1d624532e9ecfb4aee5b31538aa4ba740ef.
This commit is contained in:
committed by
GitHub
parent
3fa08bf64f
commit
c4fc060030
@@ -125,10 +125,14 @@ export class Output {
|
||||
this.debug(`Spinner invoked (${message}) with a ${delay}ms delay`);
|
||||
return;
|
||||
}
|
||||
if (this._spinner) {
|
||||
this._spinner.text = message;
|
||||
if (this.isTTY) {
|
||||
if (this._spinner) {
|
||||
this._spinner.text = message;
|
||||
} else {
|
||||
this._spinner = wait(message, delay);
|
||||
}
|
||||
} else {
|
||||
this._spinner = wait(message, delay);
|
||||
this.print(`${message}\n`);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user