diff options
author | Mark Rousskov <mark.simulacrum@gmail.com> | 2024-07-21 10:25:48 -0400 |
---|---|---|
committer | Mark Rousskov <mark.simulacrum@gmail.com> | 2024-07-21 10:25:48 -0400 |
commit | 7be792e62263ae4fd76ef0dda44527b002447d9c (patch) | |
tree | 7b1dadeddfc09ee8eebadc5dd665c073989f0395 | |
parent | 36c4e00959090b2de0c70414819f7a593352e61c (diff) |
Fix dry-run execution of pre-release
-rw-r--r-- | src/bootstrap/src/lib.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/bootstrap/src/lib.rs b/src/bootstrap/src/lib.rs index d2910f8edc6..a8555b2c367 100644 --- a/src/bootstrap/src/lib.rs +++ b/src/bootstrap/src/lib.rs @@ -1511,6 +1511,12 @@ Executed at: {executed_at}"#, } fn beta_prerelease_version(&self) -> u32 { + if self.config.dry_run() { + // Dry run doesn't actually execute a git command, which will panic when trying to parse + // the outputs. + return 0; + } + fn extract_beta_rev_from_file<P: AsRef<Path>>(version_file: P) -> Option<String> { let version = fs::read_to_string(version_file).ok()?; |