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 @@ -14,6 +14,7 @@ use crate::util::toml_mut::manifest::LocalManifest;
14
14
use crate :: util:: toml_mut:: upgrade:: upgrade_requirement;
15
15
use crate :: util:: { style, OptVersionReq } ;
16
16
use crate :: util:: { CargoResult , VersionExt } ;
17
+ use anyhow:: Context as _;
17
18
use itertools:: Itertools ;
18
19
use semver:: { Op , Version , VersionReq } ;
19
20
use std:: cmp:: Ordering ;
@@ -224,7 +225,10 @@ pub fn upgrade_manifests(
224
225
225
226
let to_update = to_update
226
227
. iter ( )
227
- . map ( |s| PackageIdSpec :: parse ( s) )
228
+ . map ( |spec| {
229
+ PackageIdSpec :: parse ( spec)
230
+ . with_context ( || format ! ( "invalid package ID specification: `{spec}`" ) )
231
+ } )
228
232
. collect :: < Result < Vec < _ > , _ > > ( ) ?;
229
233
230
234
// Updates often require a lot of modifications to the registry, so ensure
Original file line number Diff line number Diff line change @@ -2263,7 +2263,10 @@ fn update_breaking_spec_version() {
2263
2263
. masquerade_as_nightly_cargo ( & [ "update-breaking" ] )
2264
2264
. with_status ( 101 )
2265
2265
. with_stderr_data ( str![ [ r#"
2266
- [ERROR] expected a version like "1.32"
2266
+ [ERROR] invalid package ID specification: `incompatible@foo`
2267
+
2268
+ Caused by:
2269
+ expected a version like "1.32"
2267
2270
2268
2271
"# ] ] )
2269
2272
. run ( ) ;
You can’t perform that action at this time.
0 commit comments