Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to find foundry.toml in CI environment when target is not root dir #509

Closed
LEAFERx opened this issue Oct 19, 2023 · 2 comments
Closed

Comments

@LEAFERx
Copy link

LEAFERx commented Oct 19, 2023

Describe the problem

Currently when using crytic/[email protected], slither failed to run forge clean, complaining FileNotFoundError: [Errno 2] No such file or directory: 'foundry.toml' (see https://github.com/SpecularL2/specular/actions/runs/6577194479/job/17868312892#step:9:321).

However, just before this, slither is able to install foundry dependencies using foundry.toml (see https://github.com/SpecularL2/specular/actions/runs/6577194479/job/17868312892#step:9:317) and we have confirmed that foundry.toml is inside the directory (see https://github.com/SpecularL2/specular/actions/runs/6577194479/job/17868312892#step:8:19).

We confirmed this problem in both slither v0.9.6 and v0.10.0. This problem did not happen before yesterday (when sliter v0.10.0 and crytic-compile v0.3.5 released). We suspect this is a problem related to crytic-compile foundry changes in v0.3.5 release.

We suspect that this is caused by the target is not root directory, which is common in monorepo. We confirmed in a minimal reproducible example that things work smoothly when target is the root directory.

How to reproduce

We created a minimal reproducible example here with the failed action here. This example is created by calling forge init under contracts folder and adding slither action.

@michaelkaplan13
Copy link

Also hitting this same issue.

@0xalpharush
Copy link
Contributor

fixed by #515

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants