From 7ea1cfd66fe635ac4672882c3549d6d2aaee33b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20J=C4=99drzejczyk?= Date: Sun, 18 Jun 2017 14:33:09 +0200 Subject: [PATCH] add check to filter out custom scripts in eject command --- packages/react-scripts/scripts/eject.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/react-scripts/scripts/eject.js b/packages/react-scripts/scripts/eject.js index c771e075d35..d168805c61d 100644 --- a/packages/react-scripts/scripts/eject.js +++ b/packages/react-scripts/scripts/eject.js @@ -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'