Skip to content

Commit 8dad81d

Browse files
wileybenetJohnNilsson
authored andcommitted
Allow use of scoped packages with a pinned version (#2853)
Fixes #2883
1 parent 27f1256 commit 8dad81d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/create-react-app/createReactApp.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ function getPackageName(installPackage) {
441441
// git+https://github.com/mycompany/react-scripts.git
442442
// git+ssh://github.com/mycompany/react-scripts.git#v1.2.3
443443
return Promise.resolve(installPackage.match(/([^\/]+)\.git(#.*)?$/)[1]);
444-
} else if (installPackage.indexOf('@') > 0) {
444+
} else if (installPackage.match(/.+@/)) {
445445
// Do not match @scope/ when stripping off @version or @tag
446446
return Promise.resolve(
447447
installPackage.charAt(0) + installPackage.substr(1).split('@')[0]

0 commit comments

Comments
 (0)