Skip to content

Commit

Permalink
Merge pull request #795 from slowcheetah/postinstall
Browse files Browse the repository at this point in the history
Postinstall refactoring
  • Loading branch information
slowcheetah authored Apr 3, 2020
2 parents afbc45c + 5a5cdde commit d986c21
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 d986c21

Please sign in to comment.