Skip to content

Commit

Permalink
Fix pantry not found on install and uninstall commands
Browse files Browse the repository at this point in the history
  • Loading branch information
felipecrs committed Jan 4, 2025
1 parent f28d931 commit 395f28b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/prefab/failsafe.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { PackageNotFoundError, hooks } from "pkgx"
import { PackageNotFoundError, PantryNotFoundError, hooks } from "pkgx"
import Logger from "../utils/Logger.ts"
const { useSync } = hooks

export default async function failsafe<T>(body: () => Promise<T>): Promise<T> {
try {
return await body()
} catch (err) {
if (err instanceof PackageNotFoundError) {
if (err instanceof PackageNotFoundError || err instanceof PantryNotFoundError) {
const logger: Logger = new Logger('sync')
const printer = {
syncing() {
Expand Down

0 comments on commit 395f28b

Please sign in to comment.