Skip to content

Commit

Permalink
fix(build): stream some time doesn't produce Build success
Browse files Browse the repository at this point in the history
Depending instead on exit code
  • Loading branch information
kkharji committed May 17, 2022
1 parent 78f587d commit 7392cfa
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/xcode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@ where
use xcodebuild::parser::Step::*;
while let Some(step) = stream.next().await {
let line = match step {
Exit(_) => { continue; }
BuildSucceed | CleanSucceed | TestSucceed | TestFailed | BuildFailed => {
Exit(v) => {
format! {
"{} ----------------------------------------------------",
step.to_string().trim().to_string()
"[{}] ----------------------------------------------------",
if v == "0" { "Succeed" } else { "Failed" }
}
}
BuildSucceed | CleanSucceed | TestSucceed | TestFailed | BuildFailed => {
continue;
}
step => step.to_string().trim().to_string(),
};
if !line.is_empty() {
Expand Down

0 comments on commit 7392cfa

Please sign in to comment.