Skip to content

Turbopack: fix unhelpful error message when deleting folder fails #81718

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,11 @@ pub fn handle_db_versioning(
}
} else {
path = base_path.join("temp");
// propagate errors: if this fails we may have stale files left over in the temp directory
remove_dir_all(&path)?;
if path.exists() {
// propagate errors: if this fails we may have stale files left over in the temp
// directory
remove_dir_all(&path)?;
}
}

Ok(path)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,11 @@ impl<T: KeyValueDatabase> KeyValueDatabaseBackingStorage<T> {
where
T: Send + Sync + 'static,
{
let startup_cache_state = check_db_invalidation_and_cleanup(&base_path)?;
let versioned_path = handle_db_versioning(&base_path, version_info, is_ci)?;
let database = (database)(versioned_path)?;
let startup_cache_state = check_db_invalidation_and_cleanup(&base_path)
.context("Failed to check database invalidation and cleanup")?;
let versioned_path = handle_db_versioning(&base_path, version_info, is_ci)
.context("Failed to handle database versioning")?;
let database = (database)(versioned_path).context("Failed to open database")?;
let backing_storage = Self {
inner: Arc::new_cyclic(
move |weak_inner: &Weak<KeyValueDatabaseBackingStorageInner<T>>| {
Expand Down
Loading