mirror of
https://github.com/rust-lang/cargo.git
synced 2025-10-01 11:30:39 +00:00
Handle Window's missing file error message
This commit is contained in:
parent
8921abd791
commit
d87951aa73
@ -870,14 +870,20 @@ error: package `foo v0.0.1 ({url})` is not installed",
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn uninstall_cwd_no_project() {
|
fn uninstall_cwd_no_project() {
|
||||||
|
let err_msg = if cfg!(windows) {
|
||||||
|
"The system cannot find the file specified."
|
||||||
|
} else {
|
||||||
|
"No such file or directory"
|
||||||
|
};
|
||||||
assert_that(
|
assert_that(
|
||||||
cargo_process("uninstall"),
|
cargo_process("uninstall"),
|
||||||
execs().with_status(101).with_stdout("").with_stderr(format!("\
|
execs().with_status(101).with_stdout("").with_stderr(format!("\
|
||||||
[ERROR] failed to read `{root}/Cargo.toml`
|
[ERROR] failed to read `{root}/Cargo.toml`
|
||||||
|
|
||||||
Caused by:
|
Caused by:
|
||||||
No such file or directory (os error 2)",
|
{err_msg} (os error 2)",
|
||||||
root = paths::root().display(),
|
root = paths::root().display(),
|
||||||
|
err_msg = err_msg,
|
||||||
)),
|
)),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user