Merge pull request #966 from aj-jaswanth/fix/958

Fixes #958: Use session.fatal() instead of assert!
This commit is contained in:
bjorn3 2020-04-14 18:52:58 +02:00 committed by GitHub
commit a78f851ea4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -225,11 +225,10 @@ impl<'a> ArchiveBuilder<'a> for ArArchiveBuilder<'a> {
.arg(self.config.dst)
.status()
.expect("Couldn't run ranlib");
assert!(
status.success(),
"Ranlib exited with code {:?}",
status.code()
);
if !status.success() {
self.config.sess.fatal(&format!("Ranlib exited with code {:?}", status.code()));
}
}
}