Skip to content

Commit 96240c8

Browse files
committed
Better error
1 parent 96a3e66 commit 96240c8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

libexec/resolve.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ if (!flags.cellar) {
2424
const pkg = await usePantry().resolve(parse(pkgname))
2525
console.log(str(pkg))
2626
} else {
27-
const { pkg } = await useCellar().has(parse(pkgname)) ?? panic()
28-
console.log(str(pkg))
27+
const entry = await useCellar().has(parse(pkgname))
28+
if (!entry) {
29+
throw new Error(`${pkgname} not installed in $TEA_PREFIX`)
30+
}
2931
}

0 commit comments

Comments
 (0)