diff --git a/src/cargo/core/workspace.rs b/src/cargo/core/workspace.rs index 5931a9a5c7f..bf2ca3d330c 100644 --- a/src/cargo/core/workspace.rs +++ b/src/cargo/core/workspace.rs @@ -145,7 +145,13 @@ impl<'cfg> Workspace<'cfg> { pub fn new(manifest_path: &Path, config: &'cfg Config) -> CargoResult> { let mut ws = Workspace::new_default(manifest_path.to_path_buf(), config); ws.target_dir = config.target_dir()?; - ws.root_manifest = ws.find_root(manifest_path)?; + + if manifest_path.is_relative() { + ws.root_manifest = Some(std::env::current_dir()?); + } else { + ws.root_manifest = ws.find_root(manifest_path)?; + } + ws.find_members()?; ws.resolve_behavior = match ws.root_maybe() { MaybePackage::Package(p) => p.manifest().resolve_behavior(),