Check if CI variable is set to 'false' (#2501)

* Fix incorrect check if CI variable is set to true

Originally build would fail on warnings with any value of CI environment variable. Now it will correctly check if it's true.

Discussed here: https://github.com/facebookincubator/create-react-app/issues/2453

* Check for "not false" instead of "not true"

After discussion we decided that this will be closer to current functionality and not break anything.
This commit is contained in:
varnav
2017-06-19 19:36:28 +03:00
committed by Joe Haddad
parent b1c0faaffe
commit 5b38c5439d

View File

@@ -112,7 +112,7 @@ function build(previousFileSizes) {
if (messages.errors.length) {
return reject(new Error(messages.errors.join('\n\n')));
}
if (process.env.CI && messages.warnings.length) {
if (process.env.CI && process.env.CI.toLowerCase() !== 'false' && messages.warnings.length) {
console.log(
chalk.yellow(
'\nTreating warnings as errors because process.env.CI = true.\n' +