Skip to content
This repository has been archived by the owner on Jun 11, 2023. It is now read-only.

Commit

Permalink
[Build] Do not treat warnings as errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mihirpathak97 committed Oct 4, 2018
1 parent 6c7d88c commit 6f6aa72
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,20 +150,21 @@ function build(previousFileSizes) {
}
return reject(new Error(messages.errors.join('\n\n')));
}
if (
process.env.CI &&
(typeof process.env.CI !== 'string' ||
process.env.CI.toLowerCase() !== 'false') &&
messages.warnings.length
) {
console.log(
chalk.yellow(
'\nTreating warnings as errors because process.env.CI = true.\n' +
'Most CI servers set it automatically.\n'
)
);
return reject(new Error(messages.warnings.join('\n\n')));
}
// Do not treat warnings as error in CI build
// if (
// process.env.CI &&
// (typeof process.env.CI !== 'string' ||
// process.env.CI.toLowerCase() !== 'false') &&
// messages.warnings.length
// ) {
// console.log(
// chalk.yellow(
// '\nTreating warnings as errors because process.env.CI = true.\n' +
// 'Most CI servers set it automatically.\n'
// )
// );
// return reject(new Error(messages.warnings.join('\n\n')));
// }

const resolveArgs = {
stats,
Expand Down

0 comments on commit 6f6aa72

Please sign in to comment.