Skip to content

Commit

Permalink
add check to filter out custom scripts in eject command (facebook#2562)
Browse files Browse the repository at this point in the history
  • Loading branch information
paweljedrzejczyk authored and morgs32 committed Sep 1, 2017
1 parent f59af96 commit 052d5f1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/react-scripts/scripts/eject.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ inquirer
Object.keys(appPackage.scripts).forEach(key => {
Object.keys(ownPackage.bin).forEach(binKey => {
const regex = new RegExp(binKey + ' (\\w+)', 'g');
if (!regex.test(appPackage.scripts[key])) {
return;
}
appPackage.scripts[key] = appPackage.scripts[key].replace(
regex,
'node scripts/$1.js'
Expand Down

0 comments on commit 052d5f1

Please sign in to comment.