We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 40ebd52 commit 9907039Copy full SHA for 9907039
src/cargo/core/workspace.rs
@@ -145,7 +145,13 @@ impl<'cfg> Workspace<'cfg> {
145
pub fn new(manifest_path: &Path, config: &'cfg Config) -> CargoResult<Workspace<'cfg>> {
146
let mut ws = Workspace::new_default(manifest_path.to_path_buf(), config);
147
ws.target_dir = config.target_dir()?;
148
- ws.root_manifest = ws.find_root(manifest_path)?;
+
149
+ if manifest_path.is_relative() {
150
+ ws.root_manifest = Some(std::env::current_dir()?);
151
+ } else {
152
+ ws.root_manifest = ws.find_root(manifest_path)?;
153
+ }
154
155
ws.find_members()?;
156
ws.resolve_behavior = match ws.root_maybe() {
157
MaybePackage::Package(p) => p.manifest().resolve_behavior(),
0 commit comments