File tree 2 files changed +8
-3
lines changed
2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 1
1
- Increased extension instance create poll timeout to 1h to match backend (#5969 ).
2
2
- Refactored ` ext:install ` to use the latest extension metadata. (#5997 )
3
+ - Added descriptive error when repo is private or not found during ` ext:dev:upload ` . (#6052 )
3
4
- Fixed issue where missing trigger warnings would be wrongly displayed when emulating extensions with HTTPS triggers. (#6055 )
4
5
- Normalized extension root path before usage in ` ext:dev:upload ` . (#6054 )
Original file line number Diff line number Diff line change @@ -729,17 +729,21 @@ async function fetchExtensionSource(
729
729
logger . info ( `Validating source code at ${ clc . bold ( sourceUri ) } ...` ) ;
730
730
const archiveUri = `${ repoUri } /archive/${ sourceRef } .zip` ;
731
731
const tempDirectory = tmp . dirSync ( { unsafeCleanup : true } ) ;
732
+ const archiveErrorMessage = `Failed to extract archive from ${ clc . bold (
733
+ archiveUri
734
+ ) } . Please check that the repo is public and that the source ref is valid.`;
732
735
try {
733
736
const response = await fetch ( archiveUri ) ;
734
737
if ( response . ok ) {
735
738
await response . body . pipe ( createUnzipTransform ( tempDirectory . name ) ) . promise ( ) ;
736
739
}
737
740
} catch ( err : any ) {
738
- throw new FirebaseError (
739
- `Failed to fetch extension archive from ${ archiveUri } . Please check the repo URI and source ref. ${ err } `
740
- ) ;
741
+ throw new FirebaseError ( archiveErrorMessage ) ;
741
742
}
742
743
const archiveName = fs . readdirSync ( tempDirectory . name ) [ 0 ] ;
744
+ if ( ! archiveName ) {
745
+ throw new FirebaseError ( archiveErrorMessage ) ;
746
+ }
743
747
const rootDirectory = path . join ( tempDirectory . name , archiveName , extensionRoot ) ;
744
748
// Pre-validation to show a more useful error message in the context of a temp directory.
745
749
try {
You can’t perform that action at this time.
0 commit comments