File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
packages/create-react-app Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,11 @@ const program = new commander.Command(packageJson.name)
8585 'https://mysite.com/my-react-scripts-0.8.2.tgz'
8686 ) } `
8787 ) ;
88+ console . log (
89+ ` - a .tar.gz archive: ${ chalk . green (
90+ 'https://mysite.com/my-react-scripts-0.8.2.tar.gz'
91+ ) } `
92+ ) ;
8893 console . log (
8994 ` It is not needed unless you specifically want to use a fork.`
9095 ) ;
@@ -432,7 +437,7 @@ function extractStream(stream, dest) {
432437
433438// Extract package name from tarball url or path.
434439function getPackageName ( installPackage ) {
435- if ( installPackage . indexOf ( '. tgz' ) > - 1 ) {
440+ if ( installPackage . match ( / ^ . + \. ( t g z | t a r \. g z ) $ / ) ) {
436441 return getTemporaryDirectory ( )
437442 . then ( obj => {
438443 let stream ;
@@ -455,7 +460,7 @@ function getPackageName(installPackage) {
455460 `Could not extract the package name from the archive: ${ err . message } `
456461 ) ;
457462 const assumedProjectName = installPackage . match (
458- / ^ .+ \/ ( .+ ?) (?: - \d + .+ ) ? \. t g z $ /
463+ / ^ .+ \/ ( .+ ?) (?: - \d + .+ ) ? \. ( t g z | t a r \. g z ) $ /
459464 ) [ 1 ] ;
460465 console . log (
461466 `Based on the filename, assuming it is "${ chalk . cyan (
You can’t perform that action at this time.
0 commit comments