diff options
Diffstat (limited to 'crates/project_model')
-rw-r--r-- | crates/project_model/src/lib.rs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/crates/project_model/src/lib.rs b/crates/project_model/src/lib.rs index 1f5a94d7f..84d1303db 100644 --- a/crates/project_model/src/lib.rs +++ b/crates/project_model/src/lib.rs | |||
@@ -151,11 +151,18 @@ impl ProjectWorkspace { | |||
151 | ProjectWorkspace::Json { project } | 151 | ProjectWorkspace::Json { project } |
152 | } | 152 | } |
153 | ProjectManifest::CargoToml(cargo_toml) => { | 153 | ProjectManifest::CargoToml(cargo_toml) => { |
154 | let cargo_version = utf8_stdout({ | ||
155 | let mut cmd = Command::new(toolchain::cargo()); | ||
156 | cmd.arg("--version"); | ||
157 | cmd | ||
158 | })?; | ||
159 | |||
154 | let cargo = CargoWorkspace::from_cargo_metadata(&cargo_toml, cargo_config) | 160 | let cargo = CargoWorkspace::from_cargo_metadata(&cargo_toml, cargo_config) |
155 | .with_context(|| { | 161 | .with_context(|| { |
156 | format!( | 162 | format!( |
157 | "Failed to read Cargo metadata from Cargo.toml file {}", | 163 | "Failed to read Cargo metadata from Cargo.toml file {}, {}", |
158 | cargo_toml.display() | 164 | cargo_toml.display(), |
165 | cargo_version | ||
159 | ) | 166 | ) |
160 | })?; | 167 | })?; |
161 | let sysroot = if with_sysroot { | 168 | let sysroot = if with_sysroot { |