mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-06-23 17:53:32 +00:00
Only uninstall 'fleet' apps when localMode is set
Local mode is still a device level config. Eventually it will become a property of an app, but for now, we don't want the supervisor trying to uninstall supervisor or host app when local mode is set
This commit is contained in:
@ -84,7 +84,13 @@ export async function getTargetApps(): Promise<DatabaseApp[]> {
|
||||
]);
|
||||
|
||||
const source = localMode ? 'local' : apiEndpoint;
|
||||
targetState = await db.models('app').where({ source });
|
||||
targetState = await db
|
||||
.models('app')
|
||||
.where({ source })
|
||||
// Local mode only applies for fleet "applications"
|
||||
// this prevents the supervisor trying to uninstall
|
||||
// the supervisor or host app for tri-app
|
||||
.orWhereNot({ class: 'fleet' });
|
||||
}
|
||||
return targetState!;
|
||||
}
|
||||
|
Reference in New Issue
Block a user