Skip to content

Commit

Permalink
Merge pull request #165 from epage/revert
Browse files Browse the repository at this point in the history
Revert "fix(trycmd): Error, instead of ignore, unknown bins"
  • Loading branch information
epage authored Nov 4, 2022
2 parents 69bb3a0 + b1e51ed commit 3598ca8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -322,11 +322,16 @@ impl Case {
}

match &step.bin {
// Will be handled by `Step::to_command`
Some(crate::schema::Bin::Path(_))
| Some(crate::schema::Bin::Name(_))
| Some(crate::schema::Bin::Error(_))
| None => {}
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 => {}
Some(crate::schema::Bin::Ignore) => {
// Unhandled by resolve
assert_eq!(output.spawn.status, SpawnStatus::Skipped);
Expand Down
5 changes: 5 additions & 0 deletions tests/cmd/unresolved.trycmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Gracefully handle a non-existent name:
```
$ non-existent-name

```

0 comments on commit 3598ca8

Please sign in to comment.