Skip to content

Commit 13b363e

Browse files
committed
Cleanup shouldPauseSpinner
1 parent 759590d commit 13b363e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

registry/lib/spawn.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ function spawn(cmd, args, options, extra) {
5959
// The stdio option can be a string or an array.
6060
// https://nodejs.org/api/child_process.html#optionsstdio
6161
const shouldPauseSpinner =
62-
!isStdioType(stdio, 'ignore') && !isStdioType(stdio, 'pipe')
62+
isSpinning && !isStdioType(stdio, 'ignore') && !isStdioType(stdio, 'pipe')
6363
if (shouldPauseSpinner) {
64-
spinner?.stop()
64+
spinner.stop()
6565
}
6666
let spawnPromise = spawn(
6767
cmd,
@@ -88,9 +88,9 @@ function spawn(cmd, args, options, extra) {
8888
.then(stripAnsiFromSpawnResult)
8989
.catch(stripAnsiFromSpawnResult)
9090
}
91-
if (spinner && shouldPauseSpinner && isSpinning) {
91+
if (shouldPauseSpinner) {
9292
spawnPromise = spawnPromise.finally(() => {
93-
spinner?.start()
93+
spinner.start()
9494
})
9595
}
9696
spawnPromise.process = oldSpawnPromise.process

0 commit comments

Comments
 (0)