mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 21:40:44 +00:00
perf: speed plugin contract tests and fix ci
This commit is contained in:
@@ -26,7 +26,17 @@ function readOptionalUtf8(filePath) {
|
||||
}
|
||||
|
||||
function removePathIfExists(targetPath) {
|
||||
fs.rmSync(targetPath, { recursive: true, force: true });
|
||||
for (let attempt = 0; ; attempt += 1) {
|
||||
try {
|
||||
fs.rmSync(targetPath, { recursive: true, force: true });
|
||||
return;
|
||||
} catch (error) {
|
||||
if (!isTransientTempRemoveError(error) || attempt >= TEMP_REMOVE_RETRY_DELAYS_MS.length) {
|
||||
throw error;
|
||||
}
|
||||
sleepSync(TEMP_REMOVE_RETRY_DELAYS_MS[attempt]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function isTransientTempRemoveError(error) {
|
||||
|
||||
Reference in New Issue
Block a user