Skip to content

Commit

Permalink
throw error if anvil not found
Browse files Browse the repository at this point in the history
  • Loading branch information
fadeev committed Sep 11, 2024
1 parent 209ed0b commit 1eea8b4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ jobs:
node-version: "21"
registry-url: "https://registry.npmjs.org"

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
# - name: Install Foundry
# uses: foundry-rs/foundry-toolchain@v1

- name: Install Dependencies
run: yarn
Expand Down
11 changes: 11 additions & 0 deletions packages/tasks/src/localnet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,17 @@ const killProcessOnPort = async (port: number, forceKill: boolean) => {
};

const localnet = async (args: any) => {
try {
execSync("which anvil");
} catch (error) {
console.error(
ansis.red(
"Error: 'anvil' not found. Please install Foundry: https://getfoundry.sh"
)
);
process.exit(1);
}

await killProcessOnPort(args.port, args.forceKill);

if (args.anvil !== "")
Expand Down

0 comments on commit 1eea8b4

Please sign in to comment.