diff options
| author | Jakub Beránek <berykubik@gmail.com> | 2025-08-25 12:06:45 +0200 |
|---|---|---|
| committer | Jakub Beránek <berykubik@gmail.com> | 2025-08-25 12:06:45 +0200 |
| commit | 89f9cf31d1d8795a87c9b107a43bb0ff497082f3 (patch) | |
| tree | eec344391f1f4929df1889fad1c2eb5f7214a95f | |
| parent | a3229e4101abeb53d96527d0042cf4b5673fc158 (diff) | |
Handle tarballs in `x test tidy`
| -rw-r--r-- | src/tools/tidy/src/gcc_submodule.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/tools/tidy/src/gcc_submodule.rs b/src/tools/tidy/src/gcc_submodule.rs index 5d726c3ea48..217eaf1758c 100644 --- a/src/tools/tidy/src/gcc_submodule.rs +++ b/src/tools/tidy/src/gcc_submodule.rs @@ -24,6 +24,12 @@ pub fn check(root_path: &Path, compiler_path: &Path, bad: &mut bool) { .output() .expect("Cannot determine git SHA of the src/gcc checkout"); + // Git is not available or we are in a tarball + if !git_output.status.success() { + eprintln!("Cannot figure out the SHA of the GCC submodule"); + return; + } + // This can return e.g. // -e607be166673a8de9fc07f6f02c60426e556c5f2 src/gcc // e607be166673a8de9fc07f6f02c60426e556c5f2 src/gcc (master-e607be166673a8de9fc07f6f02c60426e556c5f2.e607be) |
