[Plugins] Allow plugins to still load if they fail to update (#85)
* [Plugins] allow plugins to load if they fail to update On poor quality networks, plugins can fail to update. This shouldn't mean that they aren't loaded, however. * [Plugins] Log fetch error to Debug Logs not console --------- Co-authored-by: Beef <beefers@riseup.net>
This commit is contained in:
parent
24d6faa818
commit
bc03464da3
1 changed files with 1 additions and 1 deletions
|
@ -131,7 +131,7 @@ export async function initPlugins() {
|
||||||
|
|
||||||
if (!settings.safeMode?.enabled) {
|
if (!settings.safeMode?.enabled) {
|
||||||
// Loop over any plugin that is enabled, update it if allowed, then start it.
|
// Loop over any plugin that is enabled, update it if allowed, then start it.
|
||||||
await Promise.allSettled(allIds.filter(pl => plugins[pl].enabled).map(async (pl) => (plugins[pl].update && await fetchPlugin(pl), await startPlugin(pl))));
|
await Promise.allSettled(allIds.filter(pl => plugins[pl].enabled).map(async (pl) => (plugins[pl].update && await fetchPlugin(pl).catch((e: Error) => logger.error(e.message)), await startPlugin(pl))));
|
||||||
// Wait for the above to finish, then update all disabled plugins that are allowed to.
|
// Wait for the above to finish, then update all disabled plugins that are allowed to.
|
||||||
allIds.filter(pl => !plugins[pl].enabled && plugins[pl].update).forEach(pl => fetchPlugin(pl));
|
allIds.filter(pl => !plugins[pl].enabled && plugins[pl].update).forEach(pl => fetchPlugin(pl));
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue