Properly report push errors

This commit is contained in:
2021-11-28 16:15:42 +01:00
parent 09c67d4908
commit 0973ae36b8

View File

@@ -993,7 +993,10 @@ pub fn run() {
);
remote
.push(&[push_refspec], Some(&mut push_options))
.unwrap();
.unwrap_or_else(|error| {
print_error(&format!("Pushing to {} ({}) failed: {}", remote_name, remote.url().unwrap(), error));
process::exit(1);
});
target_branch
.set_upstream(Some(&upstream_branch_name))