Skip to content

Commit 5f68338

Browse files
authored
fix: actually stop spinning on success/failure (#7262)
Even after we've called `.success()` or `.stop()` on this spinner, we were continuing to render it when we receive output from the framework server.
1 parent 830cee8 commit 5f68338

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/utils/shell.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,13 @@ export const runCommand = (
6565
// even though the actual framework command might be outputting stuff
6666
const pipeDataWithSpinner = (writeStream: NodeJS.WriteStream, chunk: string | Uint8Array) => {
6767
// Clear the spinner, write the framework command line, then resume spinning
68-
spinner?.clear()
68+
if (spinner?.isSpinning()) {
69+
spinner.clear()
70+
}
6971
writeStream.write(chunk, () => {
70-
spinner?.spin()
72+
if (spinner?.isSpinning()) {
73+
spinner.spin()
74+
}
7175
})
7276
}
7377

0 commit comments

Comments
 (0)