Skip to content

Commit 5b38c54

Browse files
varnavTimer
authored andcommitted
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: #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.
1 parent b1c0faa commit 5b38c54

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/react-scripts/scripts/build.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ function build(previousFileSizes) {
112112
if (messages.errors.length) {
113113
return reject(new Error(messages.errors.join('\n\n')));
114114
}
115-
if (process.env.CI && messages.warnings.length) {
115+
if (process.env.CI && process.env.CI.toLowerCase() !== 'false' && messages.warnings.length) {
116116
console.log(
117117
chalk.yellow(
118118
'\nTreating warnings as errors because process.env.CI = true.\n' +

0 commit comments

Comments
 (0)