From b281ef35d9c15cf13519fe02cf494f0ffada78d2 Mon Sep 17 00:00:00 2001 From: Jacob Heider Date: Mon, 30 Mar 2026 11:56:30 -0400 Subject: [PATCH] fix missing pantry logic --- pkgm.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pkgm.ts b/pkgm.ts index 7d4ef01..4c95475 100755 --- a/pkgm.ts +++ b/pkgm.ts @@ -549,8 +549,15 @@ async function* ls() { } async function uninstall(arg: string) { - let found: { project: string } | undefined = - (await hooks.usePantry().find(arg))?.[0]; + let found: { project: string } | undefined; + try { + found = (await hooks.usePantry().find(arg))?.[0]; + } catch { + console.error( + "%ci pantry not found, trying to find package another way", + "color:blue", + ); + } if (!found) { found = await plumbing.which(arg); }