Skip to content

Commit f36e45e

Browse files
committed
refactor(scripts): remove redundant spinner cleanup in interactive-runner
Removes manual spinner.stop() calls and ANSI clearing sequences as spinner success()/fail() methods now handle cleanup internally. Simplifies error handling logic.
1 parent e15db2d commit f36e45e

1 file changed

Lines changed: 0 additions & 9 deletions

File tree

scripts/utils/interactive-runner.mjs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -205,15 +205,9 @@ export async function runWithOutput(command, args = [], options = {}) {
205205

206206
if (isSpinning) {
207207
if (finalCode === 0) {
208-
spinner.stop()
209208
spinner.success(`${message} completed`)
210-
// Ensure spinner is fully cleared and we're on a fresh line
211-
process.stdout.write('\r\x1b[K')
212209
} else {
213-
spinner.stop()
214210
spinner.fail(`${message} failed`)
215-
// Ensure spinner is fully cleared and we're on a fresh line
216-
process.stdout.write('\r\x1b[K')
217211
// Show output on error if configured
218212
if (showOnError && outputBuffer.length > 0) {
219213
console.log('\n--- Output ---')
@@ -233,10 +227,7 @@ export async function runWithOutput(command, args = [], options = {}) {
233227
}
234228

235229
if (isSpinning) {
236-
spinner.stop()
237230
spinner.fail(`${message} error: ${error.message}`)
238-
// Ensure spinner is fully cleared and we're on a fresh line
239-
process.stdout.write('\r\x1b[K')
240231
}
241232
reject(error)
242233
})

0 commit comments

Comments
 (0)