Skip to content

Commit

Permalink
Check if CI variable is set to 'false' (#2501)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
varnav authored and Timer committed Jun 19, 2017
1 parent b1c0faa commit 5b38c54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react-scripts/scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' +
Expand Down

0 comments on commit 5b38c54

Please sign in to comment.