Skip to content

Commit

Permalink
fix(trycmd): Error, instead of ignore, unknown bins
Browse files Browse the repository at this point in the history
This was originally written this way to be a low effort way to ignore,
especially if you wanted a markdown block of code that interspersed
different commands.

In the general case, though, you can ignore the block and this makes it
harder to root cause problems.

Fixes assert-rs#105
  • Loading branch information
epage committed Oct 6, 2022
1 parent 165be6f commit bd69224
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
14 changes: 0 additions & 14 deletions src/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,20 +321,6 @@ impl Case {
return Ok(output);
}

#[allow(unused_variables)]
match &step.bin {
Some(crate::schema::Bin::Path(_)) => {}
Some(crate::schema::Bin::Name(name)) => {
// Unhandled by resolve
snapbox::debug!("bin={:?} not found", name);
assert_eq!(output.spawn.status, SpawnStatus::Skipped);
return Ok(output);
}
Some(crate::schema::Bin::Error(_)) => {}
// Unlike `Name`, this always represents a bug
None => {}
}

let cmd = step.to_command(cwd).map_err(|e| output.clone().error(e))?;
let cmd_output = cmd
.output()
Expand Down
5 changes: 0 additions & 5 deletions tests/cmd/unresolved.trycmd

This file was deleted.

0 comments on commit bd69224

Please sign in to comment.