diff --git a/cloudron.js b/cloudron.js index 957395e..e3cf614 100644 --- a/cloudron.js +++ b/cloudron.js @@ -178,7 +178,7 @@ Cloudron.prototype.uninstallApp = function (appId) { } } debug('App is uninstalled'.green); -} +}; Cloudron.prototype.update = function (toVersion) { process.stdout.write('Trying to update'); @@ -188,6 +188,7 @@ Cloudron.prototype.update = function (toVersion) { process.stdout.write('.'); res = request.post(this._origin + '/api/v1/cloudron/update').query({ access_token: this._credentials.accessToken }).send({ password: this._credentials.password }).end(); if (res.statusCode === 422) continue; // box has not seen the update yet + if (res.statusCode === 409) break; // update is in progress, lock was acquired verifyResponse(res, 'Could not update'); break; }