Skip to content

Commit

Permalink
If template name already starts with cra-template leave it alone (#7880)
Browse files Browse the repository at this point in the history
  • Loading branch information
iansu authored Oct 24, 2019
1 parent facd8f9 commit 3e7391d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/create-react-app/createReactApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`;
Expand Down

0 comments on commit 3e7391d

Please sign in to comment.