Skip to content

Commit a3ac3c5

Browse files
varnavromaindso
authored andcommitted
Check if CI variable is set to 'false' (facebook#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: facebook#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 8018b31 commit a3ac3c5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/react-scripts/scripts/build.js

Lines changed: 1 addition & 1 deletion
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)