diff --git a/packages/create-react-app/createReactApp.js b/packages/create-react-app/createReactApp.js index e7dbbb35842..7a9afed2f78 100755 --- a/packages/create-react-app/createReactApp.js +++ b/packages/create-react-app/createReactApp.js @@ -83,6 +83,11 @@ const program = new commander.Command(packageJson.name) 'https://mysite.com/my-react-scripts-0.8.2.tgz' )}` ); + console.log( + ` - a .tar.gz archive: ${chalk.green( + 'https://mysite.com/my-react-scripts-0.8.2.tar.gz' + )}` + ); console.log( ` It is not needed unless you specifically want to use a fork.` ); @@ -417,7 +422,7 @@ function extractStream(stream, dest) { // Extract package name from tarball url or path. function getPackageName(installPackage) { - if (installPackage.indexOf('.tgz') > -1) { + if (installPackage.match(/^.+\.(tgz|tar\.gz)$/)) { return getTemporaryDirectory() .then(obj => { let stream; @@ -440,7 +445,7 @@ function getPackageName(installPackage) { `Could not extract the package name from the archive: ${err.message}` ); const assumedProjectName = installPackage.match( - /^.+\/(.+?)(?:-\d+.+)?\.tgz$/ + /^.+\/(.+?)(?:-\d+.+)?\.(tgz|tar\.gz)$/ )[1]; console.log( `Based on the filename, assuming it is "${chalk.cyan(