-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
cargo-plumbing/tests/testsuite/locate_manifest.rs
Lines 106 to 118 in 1c9fa58
#[cargo_test] | |
fn errors_when_no_manifest() { | |
let p = project().no_manifest().build(); | |
p.cargo_plumbing("plumbing locate-manifest") | |
.with_stderr_data(str![[r#" | |
[ERROR] could not find `Cargo.toml` in `[ROOT]/foo` or any parent directory | |
"#]]) | |
.with_stdout_data("") | |
.with_status(101) | |
.run(); | |
} |
Currently, we have one test for errors and that error is in a form of plain strings outputted to stderr. In the future, should we keep doing this or should we opt in for an all jsonlines option? Perhaps something like this.
{
"reason": "locate-manifest-error",
"msg": "could not find `Cargo.toml` in `[ROOT]/foo` or any parent directory"
}
I don't think outputting to stderr is a problem, its just that we currently don't have a way for users to understand errors programmatically.
I remember we had a conversation about handling errors in cargo-plumbing-schemas
, though I don't remember where exactly.
Metadata
Metadata
Assignees
Labels
No labels