From 3e7391ddaf905e737a3b1c6969a6da3f16513854 Mon Sep 17 00:00:00 2001 From: Ian Sutherland Date: Thu, 24 Oct 2019 16:32:35 -0700 Subject: [PATCH] If template name already starts with cra-template leave it alone (#7880) --- packages/create-react-app/createReactApp.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/create-react-app/createReactApp.js b/packages/create-react-app/createReactApp.js index 5f65161f00..a6dd9fdc97 100755 --- a/packages/create-react-app/createReactApp.js +++ b/packages/create-react-app/createReactApp.js @@ -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}`;