Skip to content

Commit f901f65

Browse files
ntsklabCopilot
andauthored
Potential fix for pull request finding
It will become more robust. The proposal seems reasonable. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent ff7c13c commit f901f65

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/media.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,12 @@ export async function makeVideoScreenshot(
140140
});
141141
return defaultScreenshot;
142142
} finally {
143-
await rm(tmpDir, { recursive: true, force: true });
143+
try {
144+
await rm(tmpDir, { recursive: true, force: true });
145+
} catch (cleanupError) {
146+
logger.warn("Failed to clean up temporary directory: {error}", {
147+
error: cleanupError,
148+
});
149+
}
144150
}
145151
}

0 commit comments

Comments
 (0)