Skip to content

Commit

Permalink
⚡ Fix: Remove bun warning from base-bundler (#1484)
Browse files Browse the repository at this point in the history
## Description

_Concise description of proposed changes_

## Testing

Explain the quality checks that have been done on the code changes

## Additional Information

- [ ] I read the [contributing docs](../docs/contributing.md) (if this
is your first contribution)

Your ENS/address:
  • Loading branch information
roninjin10 authored Oct 17, 2024
1 parent d1cefe1 commit ff5f600
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions bundler-packages/base-bundler/src/getContractPath.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,9 @@ export const getContractPath = (basePath) => {
return contractPackage
} catch (e) {}
}
// @ts-expect-error checking for global existence of bun
const isBun = typeof Bun !== 'undefined'
if (isBun) {
return 'tevm/contract'
}
throw new Error(
`Could not find tevm/contract or @tevm/contract in ${basePath}!. Please install it with \`npm i @tevm/contract\` \`pnpm i @tevm/contract\` or \`yarn add tevm/contract\``,
console.warn(
`Could not find tevm/contract or @tevm/contract in ${basePath}!. Please install it with \`npm i @tevm/contract\` \`pnpm i @tevm/contract\` or \`yarn add tevm/contract\`
Falling back to attempting tevm/contract`,
)
return 'tevm/contract'
}

0 comments on commit ff5f600

Please sign in to comment.