Skip to content

Commit ce787ee

Browse files
committed
fix missing pantry logic
1 parent 173fe6c commit ce787ee

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pkgm.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -549,8 +549,12 @@ async function* ls() {
549549
}
550550

551551
async function uninstall(arg: string) {
552-
let found: { project: string } | undefined =
553-
(await hooks.usePantry().find(arg))?.[0];
552+
let found: { project: string } | undefined;
553+
try {
554+
found = (await hooks.usePantry().find(arg))?.[0];
555+
} catch {
556+
console.error("%ci pantry not found, trying to find package another way", "color:blue");
557+
}
554558
if (!found) {
555559
found = await plumbing.which(arg);
556560
}

0 commit comments

Comments
 (0)