Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/exec/executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ impl MissionExecutor {
match stop_receiver.recv() {
Ok(stop) => match stop {
StopMessage::SendStatus => {
let status = child.try_wait();
let status = child.wait();
if let Ok(status) = status {
let _ = line_sender.send(CommandExecInfo::End { status });
}
Expand Down
2 changes: 1 addition & 1 deletion src/result/command_output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pub struct CommandOutput {
#[derive(Debug)]
pub enum CommandExecInfo {
/// Command ended
End { status: Option<ExitStatus> },
End { status: ExitStatus },

/// Bacon killed the command
Interruption,
Expand Down
4 changes: 2 additions & 2 deletions src/result/command_result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ pub enum CommandResult {
impl CommandResult {
pub fn build(
output: CommandOutput,
exit_status: Option<ExitStatus>,
exit_status: ExitStatus,
mut report: Report,
) -> Result<Self> {
let error_code = exit_status.and_then(|s| s.code()).filter(|&c| c != 0);
let error_code = exit_status.code().filter(|&c| c != 0);
debug!("report stats: {:?}", &report.stats);
if let Some(error_code) = error_code {
let stats = &report.stats;
Expand Down
2 changes: 1 addition & 1 deletion src/result/report_maker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ impl ReportMaker {
pub fn build_result(
&mut self,
output: CommandOutput,
exit_status: Option<ExitStatus>,
exit_status: ExitStatus,
) -> Result<CommandResult> {
let report = self.analyzer.build_report()?;
let result = CommandResult::build(output, exit_status, report)?;
Expand Down
2 changes: 1 addition & 1 deletion src/tui/mission_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ impl<'a, 'm> MissionState<'a, 'm> {
}
pub fn finish_task(
&mut self,
exit_status: Option<ExitStatus>,
exit_status: ExitStatus,
) -> Result<()> {
let output = self.take_output().unwrap_or_default();
let result = self.report_maker.build_result(output, exit_status)?;
Expand Down