File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -145,7 +145,16 @@ impl<'cfg> Workspace<'cfg> {
145
145
pub fn new ( manifest_path : & Path , config : & ' cfg Config ) -> CargoResult < Workspace < ' cfg > > {
146
146
let mut ws = Workspace :: new_default ( manifest_path. to_path_buf ( ) , config) ;
147
147
ws. target_dir = config. target_dir ( ) ?;
148
- ws. root_manifest = ws. find_root ( manifest_path) ?;
148
+
149
+ if manifest_path. is_relative ( ) {
150
+ anyhow:: bail!(
151
+ "manifest_path:{:?} is not an absolute path. Please provide an absolute path." ,
152
+ manifest_path
153
+ )
154
+ } else {
155
+ ws. root_manifest = ws. find_root ( manifest_path) ?;
156
+ }
157
+
149
158
ws. find_members ( ) ?;
150
159
ws. resolve_behavior = match ws. root_maybe ( ) {
151
160
MaybePackage :: Package ( p) => p. manifest ( ) . resolve_behavior ( ) ,
You can’t perform that action at this time.
0 commit comments