Skip to content

Commit 31a4d14

Browse files
authored
Fix a potential issue (#2569)
1 parent 5b38c54 commit 31a4d14

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/react-scripts/scripts/build.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,12 @@ function build(previousFileSizes) {
112112
if (messages.errors.length) {
113113
return reject(new Error(messages.errors.join('\n\n')));
114114
}
115-
if (process.env.CI && process.env.CI.toLowerCase() !== 'false' && messages.warnings.length) {
115+
if (
116+
process.env.CI &&
117+
(typeof process.env.CI !== 'string' ||
118+
process.env.CI.toLowerCase() !== 'false') &&
119+
messages.warnings.length
120+
) {
116121
console.log(
117122
chalk.yellow(
118123
'\nTreating warnings as errors because process.env.CI = true.\n' +

0 commit comments

Comments
 (0)