Skip to content

Commit 2598d60

Browse files
Rollup merge of #135187 - onur-ozkan:release-fix, r=pietroalbini
apply a workaround fix for the release roadblock This has been a problem since the last two releases. r? pietroalbini
2 parents a33da79 + 614dc1c commit 2598d60

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

Diff for: src/build_helper/src/git.rs

+12-1
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,19 @@ pub fn get_closest_merge_commit(
129129
git.current_dir(git_dir);
130130
}
131131

132+
let channel = include_str!("../../ci/channel");
133+
132134
let merge_base = {
133-
if CiEnv::is_ci() {
135+
if CiEnv::is_ci() &&
136+
// FIXME: When running on rust-lang managed CI and it's not a nightly build,
137+
// `git_upstream_merge_base` fails with an error message similar to this:
138+
// ```
139+
// called `Result::unwrap()` on an `Err` value: "command did not execute successfully:
140+
// cd \"/checkout\" && \"git\" \"merge-base\" \"origin/master\" \"HEAD\"\nexpected success, got: exit status: 1\n"
141+
// ```
142+
// Investigate and resolve this issue instead of skipping it like this.
143+
(channel == "nightly" || !CiEnv::is_rust_lang_managed_ci_job())
144+
{
134145
git_upstream_merge_base(config, git_dir).unwrap()
135146
} else {
136147
// For non-CI environments, ignore rust-lang/rust upstream as it usually gets

0 commit comments

Comments
 (0)