Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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() === 'true' && messages.warnings.length) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a feeling people might set this to things like travis, etc.

How about checking !== 'false'?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about real practice of using this variable, I think we need some discussion first.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given the way it works currently (truthy), using !== false would retain current functionality and wouldn't be a breaking change (if you consider 'false' a bug).

Even if 'true' is the proper value to evaluate against, we would have to postpone that to 2.0.0.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I agree then.

console.log(
chalk.yellow(
'\nTreating warnings as errors because process.env.CI = true.\n' +
Expand Down