Skip to content

Commit

Permalink
Fixed isTTY renderer
Browse files Browse the repository at this point in the history
  • Loading branch information
usmanyunusov committed Feb 18, 2022
1 parent 73afa0a commit 98586f7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions lib/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import c from 'picocolors'

const spinnerMap = new WeakMap()
const spinnerFrames = ['-', '\\', '|', '/']
const isTTY = process.stdout.isTTY && !process.env.CI

function getSpinner() {
let index = 0
Expand Down Expand Up @@ -93,7 +92,7 @@ function renderCI(tasks) {
return output
}

export function createRenderer(stream) {
export function createRenderer(stream, { isTTY = true } = {}) {
let tasks = []
let lines = 0
let timer
Expand Down
2 changes: 1 addition & 1 deletion lib/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export function createRunner({ allowEmpty, git_paths, config, stream, files, typ
return
}

let renderer = createRenderer(stream)
let renderer = createRenderer(stream, { isTTY: process.stdout.isTTY && !process.env.CI })
let enabled = false
let revert = false
let clear = true
Expand Down

0 comments on commit 98586f7

Please sign in to comment.