File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 4848 cache-on-failure : true
4949
5050 - name : cargo fmt
51- run : cargo +nightly fmt --check --all
51+ run : |
52+ set -euo pipefail
53+ # Run cargo fmt and capture both stdout and stderr
54+ output=$(cargo +nightly fmt --check --all 2>&1) || {
55+ echo "❌ cargo fmt failed with non-zero exit code"
56+ echo "$output"
57+ exit 1
58+ }
59+ # Check for panic/ICE messages even if exit code was 0
60+ if echo "$output" | grep -qiE "(the compiler unexpectedly panicked|panicked at|Internal Compiler Error|ICE|error: the compiler unexpectedly panicked)"; then
61+ echo "❌ rustfmt panicked (ICE detected) - this should fail the build"
62+ echo "$output"
63+ exit 1
64+ fi
65+ echo "$output"
66+ echo "✅ cargo fmt completed successfully"
5267
5368 cargo-clippy-default-features :
5469 name : cargo clippy
You can’t perform that action at this time.
0 commit comments