Fixes #958: Use session.fatal() instead of assert!

This commit is contained in:
Venkata Jaswanth U 2020-04-14 21:36:28 +05:30
parent 21aa9b29bc
commit 78cdfc6c92

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()));
}
}
}