ChainSecurity / deployment_validation

Deployment Validation Files aim to simplify Deployment Validation of Smart Contracts
GNU Affero General Public License v3.0
21 stars 1 forks source link

Cannot fetch-from-etherscan inside git repository #23

Closed stiefn closed 3 weeks ago

stiefn commented 3 weeks ago

Steps

Try to fetch from etherscan with --project set to a path that is already in a git repository.

Output

The tool fails when trying to unwrap the foundry toml file. At fetch.rs line 280. For some reason, the error produced by forge init is not caught.

Running forge init manually yields the real error:

The target directory is a part of or on its own an already initialized git repository,
and it requires clean working and staging areas, including no untracked files.

Check the current git repository's status with `git status`.
Then, you can track files with `git add ...` and then commit them with `git commit`,
ignore them in the `.gitignore` file, or run this command again with the `--no-commit` flag.

If none of the previous steps worked, please open an issue at:
https://github.com/foundry-rs/foundry/issues/new/choose

Possible fix

Add --no-commit to the forge init command