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 4eff829 commit 9ceae68Copy full SHA for 9ceae68
src/cargo/util/config/mod.rs
@@ -451,7 +451,7 @@ impl Config {
451
Ok(Some(dir.clone()))
452
} else if let Some(dir) = env::var_os("CARGO_TARGET_DIR") {
453
if dir.to_str().unwrap().trim() == "" {
454
- return Ok(Some(Filesystem::new(self.cwd.join("target"))));
+ anyhow::bail!("The CARGO_TARGET_DIR environment variable is an empty string. Try adding the target directory name to it or deleting the variable.")
455
}
456
457
Ok(Some(Filesystem::new(self.cwd.join(dir))))
0 commit comments