mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-29 22:55:24 +00:00
fix: show plugins that could not be downloaded as failed (#1714)
This commit is contained in:
1 parent
034d68b163
commit
44fa791c09
2 files changed
+13
-1
No files matched your search
@@ -18,6 +18,7 @@
|
||||
- A change pushed from one linked desktop or phone now reaches your other linked devices right away, instead of on their next check a few minutes later
|
||||
- The macOS menu bar icon shows the Termix logo instead of an empty square
|
||||
- Cmd+1 (Alt+1 on Windows and Linux) and the other number shortcuts pick the open tabs as numbered in the tab bar, not the home tab
|
||||
- A plugin the app no longer ships and could not download (for example on a locked down network) shows as failed with the reason on the Plugins tab, instead of as installed
|
||||
|
||||
## 26.10.5
|
||||
|
||||
|
||||
@@ -1048,7 +1048,15 @@ export function restoreMissingPlugins(): Promise<LoadedPlugin[]> {
|
||||
await readUninstalled(),
|
||||
);
|
||||
const restored: LoadedPlugin[] = [];
|
||||
for (const id of ids) {
|
||||
// Shown on the Plugins tab, so a plugin that could not be fetched is not
|
||||
// listed as working. It stays on and is tried again on the next start.
|
||||
const markMissing = (id: string, message: string) =>
|
||||
recordState(
|
||||
id,
|
||||
"failed",
|
||||
`Not in this image and could not be downloaded: ${message}`,
|
||||
).catch(() => {});
|
||||
for (const [index, id] of ids.entries()) {
|
||||
try {
|
||||
const record = await repository.findById(id);
|
||||
const { source, release } = await requireRelease(
|
||||
@@ -1075,11 +1083,14 @@ export function restoreMissingPlugins(): Promise<LoadedPlugin[]> {
|
||||
pluginLogger.warn(`Could not restore ${id}: ${message}`, {
|
||||
operation: "plugin_restore_missing",
|
||||
});
|
||||
await markMissing(id, message);
|
||||
// The registry is down or offline, so the rest would fail the same way.
|
||||
if (
|
||||
error instanceof PluginManageError &&
|
||||
error.code === "REGISTRY_UNREACHABLE"
|
||||
) {
|
||||
for (const rest of ids.slice(index + 1))
|
||||
await markMissing(rest, message);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user