Skip to content

Commit b63dcbb

Browse files
chore: show fix command when rustfmt check fails
1 parent 71a5e62 commit b63dcbb

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

ci/scripts/rust_fmt.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,7 @@ rustup toolchain install nightly --component rustfmt
2424

2525
# Use nightly rustfmt to check formatting including doc comments
2626
# This requires nightly because format_code_in_doc_comments is an unstable feature
27-
cargo +nightly fmt --all -- --check --config format_code_in_doc_comments=true
27+
if ! cargo +nightly fmt --all -- --check --config format_code_in_doc_comments=true; then
28+
echo "To fix, run: cargo +nightly fmt --all -- --config format_code_in_doc_comments=true"
29+
exit 1
30+
fi

0 commit comments

Comments
 (0)