Skip to content

Commit 3e7391d

Browse files
authored
If template name already starts with cra-template leave it alone (#7880)
1 parent facd8f9 commit 3e7391d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/create-react-app/createReactApp.js

+2
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,8 @@ function getTemplateInstallPackage(template, originalDirectory) {
645645
) {
646646
// for tar.gz or alternative paths
647647
templateToInstall = template;
648+
} else if (template.startsWith(templateToInstall)) {
649+
templateToInstall = template;
648650
} else if (!template.startsWith(templateToInstall)) {
649651
// Add prefix `cra-template` to non-prefixed templates.
650652
templateToInstall += `-${template}`;

0 commit comments

Comments
 (0)