mirror of
https://github.com/alex8088/electron-vite.git
synced 2026-04-30 01:38:14 +08:00
fix: skip TTY terminal manipulations in CI environments
This commit is contained in:
parent
fa84b6d6c3
commit
517d703cbf
@ -185,7 +185,7 @@ function transformReporterPlugin(
|
||||
}
|
||||
|
||||
function writeLine(output: string): void {
|
||||
if (!process.stdout.isTTY) return
|
||||
if (!process.stdout.isTTY || process.env.CI) return
|
||||
clearLine()
|
||||
if (output.length < process.stdout.columns) {
|
||||
process.stdout.write(output)
|
||||
@ -195,7 +195,7 @@ function writeLine(output: string): void {
|
||||
}
|
||||
|
||||
function clearLine(move: number = 0): void {
|
||||
if (!process.stdout.isTTY) return
|
||||
if (!process.stdout.isTTY || process.env.CI) return
|
||||
if (move < 0) {
|
||||
process.stdout.moveCursor(0, move)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user