Skip to content

Commit

Permalink
cargo fix update
Browse files Browse the repository at this point in the history
  • Loading branch information
taskooh committed Jul 4, 2024
1 parent fe4b098 commit 2371140
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/rust_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,11 @@ jobs:
restore-keys: |
${{ runner.os }}-cargo-
- name: Run cargo fix and check for changes
- name: Check if cargo fix would make changes
run: |
cargo fix --all --allow-dirty
if [[ $(git diff) ]]; then
echo "::warning file=$(git diff --name-only | head -n1),line=1,col=1::Code changes were made by cargo fix. Please review and commit the changes."
if cargo fix --check --all; then
echo "No changes needed by cargo fix"
else
echo "::error::cargo fix would make changes. Please run 'cargo fix' locally and commit the changes."
exit 1
fi

0 comments on commit 2371140

Please sign in to comment.