cargo
cargo copied to clipboard
fmt action with a specified manifest located in a sub-folder did not find the parent folder rustfmt.toml config
Do the checklist before filing an issue:
- [x] Is this related to the
actions-rsActions? If you think it's a problem related to Github Actions in general, use GitHub Community forum instead: https://github.community - [x] You've read the Contributing section about bugs reporting: https://github.com/actions-rs/.github/blob/master/CONTRIBUTING.md#reporting-bugs
- [ ] Is this something you can debug and fix? Send a pull request! Bug fixes and documentation fixes are welcome.
Description
I am running the action-rs fmt action with a specified manifest in a subdir --manifest-path ./2021/Cargo.toml and the action fail at finding the rustfmt.toml file that is in the parent folder, leading to the formating check to fail
Workflow code
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --manifest-path ./2021/Cargo.toml --all -- --check
Action output
Run actions-rs/cargo@v1
with:
command: fmt
args: --manifest-path ./2021/Cargo.toml --all -- --check
use-cross: false
/home/runner/.cargo/bin/cargo fmt --manifest-path ./2021/Cargo.toml --all -- --check
Diff in /home/runner/work/advent-of-code/advent-of-code/2021/src/common.rs at line 7:
/// ```
pub fn cartesian<I, E>(a: I, b: I) -> impl Iterator<Item = (E, E)>
where
Expected behavior
The rustfmt command should be able to pull the config from the parent folder.