Skip to content

Commit 7be792e

Browse files
Fix dry-run execution of pre-release
1 parent 36c4e00 commit 7be792e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/bootstrap/src/lib.rs

+6
Original file line numberDiff line numberDiff line change
@@ -1511,6 +1511,12 @@ Executed at: {executed_at}"#,
15111511
}
15121512

15131513
fn beta_prerelease_version(&self) -> u32 {
1514+
if self.config.dry_run() {
1515+
// Dry run doesn't actually execute a git command, which will panic when trying to parse
1516+
// the outputs.
1517+
return 0;
1518+
}
1519+
15141520
fn extract_beta_rev_from_file<P: AsRef<Path>>(version_file: P) -> Option<String> {
15151521
let version = fs::read_to_string(version_file).ok()?;
15161522

0 commit comments

Comments
 (0)