Skip to content

Commit 78cdfc6

Browse files
Fixes #958: Use session.fatal() instead of assert!
1 parent 21aa9b2 commit 78cdfc6

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/archive.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -225,11 +225,10 @@ impl<'a> ArchiveBuilder<'a> for ArArchiveBuilder<'a> {
225225
.arg(self.config.dst)
226226
.status()
227227
.expect("Couldn't run ranlib");
228-
assert!(
229-
status.success(),
230-
"Ranlib exited with code {:?}",
231-
status.code()
232-
);
228+
229+
if !status.success() {
230+
self.config.sess.fatal(&format!("Ranlib exited with code {:?}", status.code()));
231+
}
233232
}
234233
}
235234

0 commit comments

Comments
 (0)