Pick values from updateConfig

This commit is contained in:
Girish Ramakrishnan
2019-08-29 20:47:38 -07:00
parent 5ec0d1e691
commit f0fd088247

View File

@@ -266,7 +266,7 @@ function downloadIcon(app, callback) {
.buffer(true)
.timeout(30 * 1000)
.end(function (error, res) {
if (error && !error.response) return retryCallback(new Error('Network error downloading icon:' + error.message));
if (error && !error.response) return retryCallback(new Error('Network error downloading icon : ' + error.message));
if (res.statusCode !== 200) return retryCallback(null); // ignore error. this can also happen for apps installed with cloudron-cli
if (!safe.fs.writeFileSync(path.join(paths.APP_ICONS_DIR, app.id + '.png'), res.body)) return retryCallback(new Error('Error saving icon:' + safe.error.message));
@@ -778,8 +778,7 @@ function update(app, updateConfig, progressCallback, callback) {
}, next);
},
// switch over to the new config. manifest, memoryLimit, portBindings, appstoreId are updated here
updateApp.bind(null, app, updateConfig),
updateApp.bind(null, app, _.pick(updateConfig, 'manifest', 'appStoreId', 'memoryLimit')), // switch over to the new config
progressCallback.bind(null, { percent: 45, message: 'Downloading icon' }),
downloadIcon.bind(null, app),