mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-04-24 05:05:53 +08:00
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:
2
packages/react-scripts/scripts/build.js
vendored
2
packages/react-scripts/scripts/build.js
vendored
@@ -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' +
|
||||
|
||||
Reference in New Issue
Block a user