Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable spinner when running in CI #356

Merged
merged 4 commits into from
Feb 13, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const version = require('../package.json').version;
const ora = require('ora');
const chalk = require('chalk');
const startTime = Date.now();
const ci = require('ci-info');

// Revert https://github.com/tj/commander.js/pull/1409
program.storeOptionsAsProperties();
Expand Down Expand Up @@ -75,7 +76,8 @@ const spinner = ora({
text: 'Finding files',
color: 'white',
interval: 100000,
isEnabled: program.spinner
isEnabled: !ci.isCI && program.spinner,
isSilent: ci.isCI
kamiazya marked this conversation as resolved.
Show resolved Hide resolved
});

let exitCode = 0;
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
},
"dependencies": {
"chalk": "^4.1.1",
"ci-info": "^3.7.1",
"commander": "^7.2.0",
"commondir": "^1.0.1",
"debug": "^4.3.1",
Expand Down