Fix a potential issue (#2569)

This commit is contained in:
Joe Haddad
2017-06-19 13:27:02 -04:00
committed by GitHub
parent 5b38c5439d
commit 31a4d14b33

View File

@@ -112,7 +112,12 @@ function build(previousFileSizes) {
if (messages.errors.length) {
return reject(new Error(messages.errors.join('\n\n')));
}
if (process.env.CI && process.env.CI.toLowerCase() !== 'false' && messages.warnings.length) {
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' +