From d585b5abdab9f54e52d3bbb474106f24bc21e528 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 c771e075d..d168805c6 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'