Skip to content

Commit

Permalink
Postinstall refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
slowcheetah committed Apr 3, 2020
1 parent afbc45c commit 5a5cdde
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core-js/postinstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ var ADBLOCK = is(env.ADBLOCK);
var COLOR = is(env.npm_config_color);
var DISABLE_OPENCOLLECTIVE = is(env.DISABLE_OPENCOLLECTIVE);
var SILENT = ['silent', 'error', 'warn'].indexOf(env.npm_config_loglevel) !== -1;
var OPEN_SOURCE_CONTRIBUTOR = is(env.OPEN_SOURCE_CONTRIBUTOR);
var MINUTE = 60 * 1000;

// you could add a PR with an env variable for your CI detection
Expand All @@ -16,7 +17,6 @@ var CI = [
'CI',
'CONTINUOUS_INTEGRATION',
'DRONE',
'OPEN_SOURCE_CONTRIBUTOR',
'RUN_ID'
].some(function (it) { return is(env[it]); });

Expand All @@ -31,7 +31,7 @@ function is(it) {
}

function isBannerRequired() {
if (ADBLOCK || CI || DISABLE_OPENCOLLECTIVE || SILENT) return false;
if (ADBLOCK || CI || DISABLE_OPENCOLLECTIVE || SILENT || OPEN_SOURCE_CONTRIBUTOR) return false;
var file = path.join(os.tmpdir(), 'core-js-banners');
var banners = [];
try {
Expand Down

0 comments on commit 5a5cdde

Please sign in to comment.