Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'xtask/src/release.rs')
-rw-r--r--xtask/src/release.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/xtask/src/release.rs b/xtask/src/release.rs
index 5699053a23..b936876b52 100644
--- a/xtask/src/release.rs
+++ b/xtask/src/release.rs
@@ -119,12 +119,11 @@ impl flags::RustcPull {
// Fetch given rustc commit.
cmd!(sh, "git fetch http://localhost:{JOSH_PORT}/rust-lang/rust.git@{commit}{JOSH_FILTER}.git")
.run()
- .map_err(|e| {
+ .inspect_err(|_| {
// Try to un-do the previous `git commit`, to leave the repo in the state we found it it.
cmd!(sh, "git reset --hard HEAD^")
.run()
.expect("FAILED to clean up again after failed `git fetch`, sorry for that");
- e
})
.context("FAILED to fetch new commits, something went wrong (committing the rust-version file has been undone)")?;