mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
fix: emit errors instead of warnings when glob patterns not found
This commit is contained in:
parent
e5007de6e9
commit
e4a1794b41
@ -158,8 +158,7 @@ impl Packages {
|
||||
.map(PackageIdSpec::from_package_id);
|
||||
specs.extend(matched_pkgs);
|
||||
}
|
||||
emit_pattern_not_found(ws, patterns, false)
|
||||
.or_else(|e| ws.config().shell().warn(e))?;
|
||||
emit_pattern_not_found(ws, patterns, false)?;
|
||||
specs
|
||||
}
|
||||
Packages::Default => ws
|
||||
|
@ -3770,13 +3770,8 @@ fn build_virtual_manifest_glob_not_found() {
|
||||
.build();
|
||||
|
||||
p.cargo("build -p bar -p '*z'")
|
||||
.with_stderr(
|
||||
"\
|
||||
[WARNING] package pattern(s) `*z` not found in workspace [..]
|
||||
[COMPILING] bar v0.1.0 ([..])
|
||||
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
|
||||
",
|
||||
)
|
||||
.with_status(101)
|
||||
.with_stderr("[ERROR] package pattern(s) `*z` not found in workspace [..]")
|
||||
.run();
|
||||
}
|
||||
|
||||
|
@ -3033,9 +3033,8 @@ fn test_virtual_manifest_glob_not_found() {
|
||||
.build();
|
||||
|
||||
p.cargo("test -p bar -p '*z'")
|
||||
.with_stderr_contains("[WARNING] package pattern(s) `*z` not found in workspace [..]")
|
||||
.with_stdout_contains("running 1 test\ntest bar ... ok")
|
||||
.with_stdout_does_not_contain("running 1 test\ntest baz ... ok")
|
||||
.with_status(101)
|
||||
.with_stderr("[ERROR] package pattern(s) `*z` not found in workspace [..]")
|
||||
.run();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user