Skip to content

Commit 774ac90

Browse files
author
Patrick Dillon
committed
Support passing scoped package names to --scripts-version arg
1 parent 94ec885 commit 774ac90

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/create-react-app/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ function getInstallPackage(version) {
154154
function getPackageName(installPackage) {
155155
if (~installPackage.indexOf('.tgz')) {
156156
return installPackage.match(/^.+\/(.+)-.+\.tgz$/)[1];
157-
} else if (~installPackage.indexOf('@')) {
158-
return installPackage.split('@')[0];
157+
} else if (installPackage.indexOf('@') > 0) {
158+
return installPackage.charAt(0) + installPackage.substr(1).split('@')[0];
159159
}
160160
return installPackage;
161161
}

0 commit comments

Comments
 (0)