Skip to content

Providing location to Cargo.toml  #8

@dzieciou

Description

@dzieciou

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions