mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-04-23 20:51:12 +08:00
If template name already starts with cra-template leave it alone (#7880)
This commit is contained in:
@@ -645,6 +645,8 @@ function getTemplateInstallPackage(template, originalDirectory) {
|
||||
) {
|
||||
// for tar.gz or alternative paths
|
||||
templateToInstall = template;
|
||||
} else if (template.startsWith(templateToInstall)) {
|
||||
templateToInstall = template;
|
||||
} else if (!template.startsWith(templateToInstall)) {
|
||||
// Add prefix `cra-template` to non-prefixed templates.
|
||||
templateToInstall += `-${template}`;
|
||||
|
||||
Reference in New Issue
Block a user