diff --git a/.github/workflows/rustfmt_check.yml b/.github/workflows/rustfmt_check.yml index 38626bca0..5077b0adc 100644 --- a/.github/workflows/rustfmt_check.yml +++ b/.github/workflows/rustfmt_check.yml @@ -14,7 +14,9 @@ jobs: rustup component add rustfmt --toolchain nightly - name: Ensure the `main` branch rustfmt is applied for the run - run: git checkout main rustfmt.toml + run: | + git fetch --no-tags --prune --no-recurse-submodules --depth=1 origin/main + git checkout main rustfmt.toml - name: Run cargo +nightly fmt --check run: cargo +nightly fmt --check