From b66436c6de3e2c60031eb5955352b91e1a9801b6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 16 Jan 2026 01:25:45 +0000 Subject: [PATCH 1/2] Initial plan From bc909db3a8966f1e9d6eb767224a2eef235ff370 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 16 Jan 2026 01:28:49 +0000 Subject: [PATCH 2/2] fix: add check for empty marketplace list in updateAllMarketplaces Co-authored-by: scaryrawr <661373+scaryrawr@users.noreply.github.com> --- src/marketplace.test.ts | 19 +++++++++++++++++++ src/marketplace.ts | 5 +++++ 2 files changed, 24 insertions(+) diff --git a/src/marketplace.test.ts b/src/marketplace.test.ts index 933f663..c5d40ce 100644 --- a/src/marketplace.test.ts +++ b/src/marketplace.test.ts @@ -419,4 +419,23 @@ describe("marketplace", () => { expect(calls).toEqual([["git", "-C", alphaLocation, "pull"]]); expect(messages).toContain("Updated 1 marketplace(s)"); }); + + test("updateAllMarketplaces() prints message when no GitHub marketplaces found", async () => { + writeKnownMarketplaces({ + local: { + source: { source: "directory", path: "/some/path" }, + installLocation: "/some/path", + lastUpdated: "2025-01-01T00:00:00.000Z", + }, + }); + + const { messages, restore } = captureConsole("log"); + try { + await updateAllMarketplaces(paths); + } finally { + restore(); + } + + expect(messages).toContain("No marketplaces to update."); + }); }); diff --git a/src/marketplace.ts b/src/marketplace.ts index c1844d4..fcb51dc 100644 --- a/src/marketplace.ts +++ b/src/marketplace.ts @@ -256,6 +256,11 @@ export async function updateAllMarketplaces( ([, info]) => info.source.source === "github", ); + if (githubMarketplaces.length === 0) { + console.log("No marketplaces to update."); + return; + } + for (const [name] of githubMarketplaces) { await updateMarketplace(name, paths); }