Skip to content

Commit 79115a6

Browse files
committed
Refactor migration-loader.function.ts to conditionally clear line in stopLoader
1 parent 0750f6b commit 79115a6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/migrations/migration-loader.function.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,7 @@ export function startLoader(message) {
1616
export function stopLoader(loaderInterval) {
1717
clearInterval(loaderInterval);
1818
readline.cursorTo(process.stdout, 0);
19-
process.stdout.clearLine(0);
19+
if (process.stdout.isTTY) {
20+
process.stdout.clearLine(0);
21+
}
2022
}

0 commit comments

Comments
 (0)