I have repository that has both Python and Rust code inside.
In the root of the repository I have .pre-commit-config.yaml
with:
- repo: https://github.com/doublify/pre-commit-rust
rev: master
hooks:
- id: fmt
args: ['--manifest-path', 'rust_code/Cargo.toml']
In the rust_code/
folder I have rust code together with Cargo.toml
.
However, it looks like the hook expects Cargo.toml
to be in the root of the repository and is ignoring arguments.
Error during execution of `cargo metadata`: error: could not find `Cargo.toml` in `D:\projects\project-repo` or any parent directory
What options do I have?