Skip to content
This repository has been archived by the owner on Jan 26, 2019. It is now read-only.

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: facebook/create-react-app#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 wmonk committed Aug 7, 2017
1 parent d68ed30 commit 1f4db46
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 1f4db46

Please sign in to comment.