Skip to content

Commit 89f9cf3

Browse files
committed
Handle tarballs in x test tidy
1 parent a3229e4 commit 89f9cf3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/tools/tidy/src/gcc_submodule.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ pub fn check(root_path: &Path, compiler_path: &Path, bad: &mut bool) {
2424
.output()
2525
.expect("Cannot determine git SHA of the src/gcc checkout");
2626

27+
// Git is not available or we are in a tarball
28+
if !git_output.status.success() {
29+
eprintln!("Cannot figure out the SHA of the GCC submodule");
30+
return;
31+
}
32+
2733
// This can return e.g.
2834
// -e607be166673a8de9fc07f6f02c60426e556c5f2 src/gcc
2935
// e607be166673a8de9fc07f6f02c60426e556c5f2 src/gcc (master-e607be166673a8de9fc07f6f02c60426e556c5f2.e607be)

0 commit comments

Comments
 (0)