Skip to content

Commit b8e6c55

Browse files
committed
Continue on non-compilation
(But still exit on Cargo errors)
1 parent 5bc6929 commit b8e6c55

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/build/mod.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,7 @@ impl Builder {
5555
let mut cmd = self.init_cmd();
5656
let status = cmd.status().expect("Running build failed");
5757
let result = status.code();
58-
if let Some(0) = result {
59-
self.clean_analysis();
60-
}
58+
self.clean_analysis();
6159
result
6260
}
6361

src/server.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ impl Server {
7777
let code = builder.build().unwrap();
7878
status.finish_build();
7979

80-
if code != 0 {
80+
// Test specifically for `1` rather than `!= 0` since a compilation
81+
// failure gives `101`, and we want to continue then.
82+
if code == 1 {
8183
process::exit(1);
8284
}
8385
status.start_analysis();

0 commit comments

Comments
 (0)