Restore apps if the existingInfra version is not semver (as in, old infra)

This commit is contained in:
Girish Ramakrishnan
2017-04-04 12:15:29 -07:00
parent 71fe094be1
commit d891058f8c

View File

@@ -347,7 +347,7 @@ function startApps(existingInfra, callback) {
if (existingInfra.version === infra.version) {
debug('startApp: apps are already uptodate');
callback();
} else if (existingInfra.version === 'none' || semver.major(existingInfra.version) !== semver.major(infra.version)) {
} else if (existingInfra.version === 'none' || !semver.valid(existingInfra.version) || semver.major(existingInfra.version) !== semver.major(infra.version)) {
debug('startApps: restoring installed apps');
apps.restoreInstalledApps(callback);
} else {