Skip to content

Commit 9883d20

Browse files
committed
don't lock the package cache when cleaning target dir.
Fixes #7490
1 parent aa4820b commit 9883d20

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cargo/ops/cargo_clean.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ pub fn clean(ws: &Workspace<'_>, opts: &CleanOptions<'_>) -> CargoResult<()> {
3939
return rm_rf(&target_dir.into_path_unlocked(), config);
4040
}
4141

42-
let (packages, resolve) = ops::resolve_ws(ws)?;
4342
let profiles = ws.profiles();
4443

4544
// Check for whether the profile is defined.
@@ -61,6 +60,7 @@ pub fn clean(ws: &Workspace<'_>, opts: &CleanOptions<'_>) -> CargoResult<()> {
6160
if opts.spec.is_empty() {
6261
return rm_rf(&target_dir.into_path_unlocked(), config);
6362
}
63+
let (packages, resolve) = ops::resolve_ws(ws)?;
6464

6565
let interner = UnitInterner::new();
6666
let mut build_config = BuildConfig::new(config, Some(1), &opts.target, CompileMode::Build)?;

0 commit comments

Comments
 (0)