File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
src/script/repositories/backup Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -82,7 +82,9 @@ if (commitId) {
8282 // If we're releasing to production, we need to ensure the commitId is part of the master branch.
8383 const commitBranch = exec ( `git branch --contains ${ commitId } ` )
8484 . split ( '\n' )
85- . map ( branch => branch . trim ( ) ) ;
85+ // the branch name will have a star in front if it's the current branch
86+ . map ( branch => branch . replace ( '* ' , '' ) . trim ( ) ) ;
87+ logger . info ( `Commit ID "${ commitId } " is part of branches: ${ commitBranch } ` ) ;
8688 if ( ! commitBranch . includes ( branch ) ) {
8789 logger . error ( `Commit ID "${ commitId } " is not part of the ${ branch } branch. Aborting.` ) ;
8890 process . exit ( 1 ) ;
Original file line number Diff line number Diff line change @@ -453,19 +453,16 @@ export class BackupRepository {
453453 message = 'The user id in the backup file header does not match the expected one' ;
454454 this . logger . error ( message ) ;
455455 throw new DifferentAccountError ( message ) ;
456- break ;
457456 }
458457 case ERROR_TYPES . INVALID_FORMAT :
459458 message = 'The provided backup version is lower than the minimum supported version' ;
460459 this . logger . error ( message ) ;
461460 throw new IncompatibleBackupError ( message ) ;
462- break ;
463461
464462 case ERROR_TYPES . INVALID_VERSION :
465463 message = 'The provided backup version is lower than the minimum supported version' ;
466464 this . logger . error ( 'The provided backup format is not supported' ) ;
467465 throw new IncompatibleBackupFormatError ( message ) ;
468- break ;
469466 }
470467 }
471468}
You can’t perform that action at this time.
0 commit comments