File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,21 @@ export class UpdateController
8888 const projectData = this . $projectDataService . getProjectData (
8989 updateOptions . projectDir
9090 ) ;
91+
92+ try {
93+ // this is a preventive check to make sure the passed version exists before doing any backups, however
94+ // the update can still fail if the specified tag doesn't exist in one of the updatableDependencies
95+ // at this stage we only care to check a single dependency to catch invalid versions early.
96+ await this . getVersionFromTag (
97+ UpdateController . updatableDependencies [ 0 ] . name ,
98+ updateOptions . version
99+ ) ;
100+ } catch ( error ) {
101+ this . $errors . fail (
102+ `${ UpdateController . updateFailMessage } Reason is: ${ error . message } `
103+ ) ;
104+ }
105+
91106 const backupDir = path . join (
92107 updateOptions . projectDir ,
93108 UpdateController . backupFolder
You can’t perform that action at this time.
0 commit comments