File tree 2 files changed +9
-2
lines changed
2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ use crate::util::toml_mut::manifest::LocalManifest;
15
15
use crate :: util:: toml_mut:: upgrade:: upgrade_requirement;
16
16
use crate :: util:: { style, OptVersionReq } ;
17
17
use crate :: util:: { CargoResult , VersionExt } ;
18
+ use anyhow:: Context as _;
18
19
use itertools:: Itertools ;
19
20
use semver:: { Op , Version , VersionReq } ;
20
21
use std:: cmp:: Ordering ;
@@ -269,7 +270,10 @@ pub fn upgrade_manifests(
269
270
270
271
let to_update = to_update
271
272
. iter ( )
272
- . map ( |s| PackageIdSpec :: parse ( s) )
273
+ . map ( |spec| {
274
+ PackageIdSpec :: parse ( spec)
275
+ . with_context ( || format ! ( "invalid package ID specification: `{spec}`" ) )
276
+ } )
273
277
. collect :: < Result < Vec < _ > , _ > > ( ) ?;
274
278
275
279
// Updates often require a lot of modifications to the registry, so ensure
Original file line number Diff line number Diff line change @@ -2269,7 +2269,10 @@ fn update_breaking_spec_version() {
2269
2269
. masquerade_as_nightly_cargo ( & [ "update-breaking" ] )
2270
2270
. with_status ( 101 )
2271
2271
. with_stderr_data ( str![ [ r#"
2272
- [ERROR] expected a version like "1.32"
2272
+ [ERROR] invalid package ID specification: `incompatible@foo`
2273
+
2274
+ Caused by:
2275
+ expected a version like "1.32"
2273
2276
2274
2277
"# ] ] )
2275
2278
. run ( ) ;
You can’t perform that action at this time.
0 commit comments