Skip to content

Commit b281ef3

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

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

pkgm.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -549,8 +549,15 @@ 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(
557+
"%ci pantry not found, trying to find package another way",
558+
"color:blue",
559+
);
560+
}
554561
if (!found) {
555562
found = await plumbing.which(arg);
556563
}

0 commit comments

Comments
 (0)