mirror of
https://github.com/alex8088/electron-vite.git
synced 2026-07-13 18:31:07 +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 {
|
function writeLine(output: string): void {
|
||||||
if (!process.stdout.isTTY) return
|
if (!process.stdout.isTTY || process.env.CI) return
|
||||||
clearLine()
|
clearLine()
|
||||||
if (output.length < process.stdout.columns) {
|
if (output.length < process.stdout.columns) {
|
||||||
process.stdout.write(output)
|
process.stdout.write(output)
|
||||||
@ -195,7 +195,7 @@ function writeLine(output: string): void {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function clearLine(move: number = 0): void {
|
function clearLine(move: number = 0): void {
|
||||||
if (!process.stdout.isTTY) return
|
if (!process.stdout.isTTY || process.env.CI) return
|
||||||
if (move < 0) {
|
if (move < 0) {
|
||||||
process.stdout.moveCursor(0, move)
|
process.stdout.moveCursor(0, move)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user