File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change 1- use anyhow:: { anyhow, Result } ;
1+ use anyhow:: { anyhow, Context , Result } ;
22use std:: {
33 mem,
44 path:: { Path , PathBuf } ,
@@ -48,11 +48,10 @@ impl BuildCommand {
4848 let next = arg_iter. next ( ) ;
4949 set (
5050 & mut manifest_path,
51- next. as_ref ( ) . map ( |p| {
52- Path :: new ( & p)
53- . canonicalize ( )
54- . expect ( "--manifest-path invalid" )
55- } ) ,
51+ next. as_ref ( )
52+ . map ( |p| Path :: new ( & p) . canonicalize ( ) )
53+ . transpose ( )
54+ . context ( "--manifest-path invalid" ) ?,
5655 ) ?;
5756 cargo_args. push ( arg) ;
5857 if let Some ( next) = next {
@@ -62,7 +61,7 @@ impl BuildCommand {
6261 _ if arg. starts_with ( "--manifest-path=" ) => {
6362 let path = Path :: new ( arg. trim_start_matches ( "--manifest-path=" ) )
6463 . canonicalize ( )
65- . expect ( "--manifest-path invalid" ) ;
64+ . context ( "--manifest-path invalid" ) ? ;
6665 set ( & mut manifest_path, Some ( path) ) ?;
6766 cargo_args. push ( arg) ;
6867 }
You can’t perform that action at this time.
0 commit comments