uninstall: must continue to teardown other addons
This commit is contained in:
+4
-4
@@ -332,7 +332,7 @@ async function uninstallCommand(app, args, progressCallback) {
|
||||
|
||||
await progressCallback({ percent: 30, message: 'Teardown addons' });
|
||||
// if install/clone/restore/import failed early (e.g. invalid image), services may not have started
|
||||
await safe(services.teardownAddons(app, app.manifest.addons), { debug: log });
|
||||
await services.teardownAddons(app, app.manifest.addons, { ignoreError: true });
|
||||
await services.teardownPersistentDirs(app);
|
||||
|
||||
await progressCallback({ percent: 40, message: 'Cleanup file manager' });
|
||||
@@ -409,7 +409,7 @@ async function installCommand(app, args, progressCallback) {
|
||||
// when restoring, app does not require these addons anymore. remove carefully to preserve the db passwords
|
||||
if (oldManifest) {
|
||||
const addonsToRemove = _.omit(oldManifest.addons, Object.keys(app.manifest.addons));
|
||||
await services.teardownAddons(app, addonsToRemove);
|
||||
await services.teardownAddons(app, addonsToRemove, {});
|
||||
}
|
||||
|
||||
if (!restoreConfig || restoreConfig.remotePath || restoreConfig.backupId) { // install/import/restore but not in-place import should delete data dir
|
||||
@@ -603,7 +603,7 @@ async function changeServicesCommand(app, args, progressCallback) {
|
||||
if (app.manifest.addons?.redis && !app.enableRedis) unusedAddons.redis = app.manifest.addons.redis;
|
||||
|
||||
await progressCallback({ percent: 20, message: 'Removing unused addons' });
|
||||
await services.teardownAddons(app, unusedAddons);
|
||||
await services.teardownAddons(app, unusedAddons, {});
|
||||
|
||||
await progressCallback({ percent: 40, message: 'Setting up addons' });
|
||||
await services.setupAddons(app, app.manifest.addons);
|
||||
@@ -728,7 +728,7 @@ async function updateCommand(app, args, progressCallback) {
|
||||
if (app.manifest.dockerImage !== updateConfig.manifest.dockerImage) await docker.deleteImage(app.manifest.dockerImage);
|
||||
|
||||
// only delete unused addons after backup
|
||||
await services.teardownAddons(app, unusedAddons);
|
||||
await services.teardownAddons(app, unusedAddons, {});
|
||||
if (Object.keys(unusedAddons).includes('localstorage')) await updateApp(app, { storageVolumeId: null, storageVolumePrefix: null }); // lose reference
|
||||
|
||||
// teardown persistent dirs removed in the new manifest
|
||||
|
||||
Reference in New Issue
Block a user