Skip to content

Commit

Permalink
Attemtping to solve Workspace using relative path.
Browse files Browse the repository at this point in the history
  • Loading branch information
hbina committed Jun 3, 2020
1 parent 40ebd52 commit 9907039
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/cargo/core/workspace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,13 @@ impl<'cfg> Workspace<'cfg> {
pub fn new(manifest_path: &Path, config: &'cfg Config) -> CargoResult<Workspace<'cfg>> {
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(),
Expand Down

0 comments on commit 9907039

Please sign in to comment.