Skip to content

Commit

Permalink
ref: Dont print install progressbar for nonTTY and CI=1 (#1270)
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilogorek committed Jul 6, 2022
1 parent da916a0 commit c65df4f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,10 @@ function shouldRenderProgressBar() {
const silentFlag = process.argv.some((v) => v === '--silent');
const silentConfig = process.env.npm_config_loglevel === 'silent';
const silentEnv = process.env.SENTRYCLI_NO_PROGRESS_BAR;
const ciEnv = process.env.CI === 'true';
const ciEnv = process.env.CI === 'true' || process.env.CI === '1';
const notTTY = !process.stdout.isTTY;
// If any of possible options is set, skip rendering of progress bar
return !(silentFlag || silentConfig || silentEnv || ciEnv);
return !(silentFlag || silentConfig || silentEnv || ciEnv || notTTY);
}

function getDownloadUrl(platform, arch) {
Expand Down

0 comments on commit c65df4f

Please sign in to comment.