Ignore empty VIRTUAL_ENV variables (#536)

I'm not sure how my interpreter gets into this state, but it's certainly
wrong to respect these.
This commit is contained in:
Charlie Marsh 2023-12-03 23:53:26 -05:00 committed by GitHub
parent 3b55d0b295
commit fc20d01593
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 20 deletions

View file

@ -31,10 +31,10 @@ pub(crate) fn clean(cache: &Cache, mut printer: Printer) -> Result<ExitStatus> {
{
if entry.file_type()?.is_dir() {
fs::remove_dir_all(entry.path())
.with_context(|| format!("Failed to clear cache at {}", cache.root().display()))?;
.with_context(|| format!("Failed to clear cache at: {}", cache.root().display()))?;
} else {
fs::remove_file(entry.path())
.with_context(|| format!("Failed to clear cache at {}", cache.root().display()))?;
.with_context(|| format!("Failed to clear cache at: {}", cache.root().display()))?;
}
}