From 052d5f12a4c048234f92511ebc0f09c276e9870e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20J=C4=99drzejczyk?= Date: Tue, 27 Jun 2017 15:11:14 +0200 Subject: [PATCH] add check to filter out custom scripts in eject command (#2562) --- 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'