Skip to content

Commit db923b9

Browse files
paweljedrzejczykromaindso
authored andcommitted
add check to filter out custom scripts in eject command (facebook#2562)
1 parent 44ba358 commit db923b9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/react-scripts/scripts/eject.js

+3
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,9 @@ inquirer
169169
Object.keys(appPackage.scripts).forEach(key => {
170170
Object.keys(ownPackage.bin).forEach(binKey => {
171171
const regex = new RegExp(binKey + ' (\\w+)', 'g');
172+
if (!regex.test(appPackage.scripts[key])) {
173+
return;
174+
}
172175
appPackage.scripts[key] = appPackage.scripts[key].replace(
173176
regex,
174177
'node scripts/$1.js'

0 commit comments

Comments
 (0)