File tree 1 file changed +15
-0
lines changed
1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,21 @@ export class UpdateController
88
88
const projectData = this . $projectDataService . getProjectData (
89
89
updateOptions . projectDir
90
90
) ;
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
+
91
106
const backupDir = path . join (
92
107
updateOptions . projectDir ,
93
108
UpdateController . backupFolder
You can’t perform that action at this time.
0 commit comments