Apps without dockerImage cannot be auto-updated

This commit is contained in:
Johannes Zellner
2020-05-11 23:20:02 +02:00
parent 650c49637f
commit e27c5583bb

View File

@@ -1820,6 +1820,10 @@ function exec(app, options, callback) {
function canAutoupdateApp(app, newManifest) {
if (!app.enableAutomaticUpdate) return false;
// for invalid subscriptions the appstore does not return a dockerImage
if (!newManifest.dockerImage) return false;
if ((semver.major(app.manifest.version) !== 0) && (semver.major(app.manifest.version) !== semver.major(newManifest.version))) return false; // major changes are blocking
if (app.runState === exports.RSTATE_STOPPED) return false; // stopped apps won't run migration scripts and shouldn't be updated