Skip to content

Commit

Permalink
feat: always delete shebang file
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkal committed Aug 5, 2020
1 parent 0280ced commit 5cbe196
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/executor.rs
Expand Up @@ -114,10 +114,14 @@ pub fn execute_command(
let spawned_child = child.spawn();
match spawned_child {
Err(err) => {
delete_file(&tempfile); // cov:include (unusual)
Some(io::Result::Err(err)) // cov:include
}
Ok(mut child) => {
let r = child.wait();
delete_file(&tempfile);
Some(io::Result::Err(err))
Some(r)
}
Ok(mut child) => Some(child.wait()),
}
}
}
Expand Down

0 comments on commit 5cbe196

Please sign in to comment.