diff --git a/scripts/release-smoke.mjs b/scripts/release-smoke.mjs index b2c5fdd..8eeea5f 100644 --- a/scripts/release-smoke.mjs +++ b/scripts/release-smoke.mjs @@ -71,8 +71,17 @@ function tempRoot(name) { return fs.mkdtempSync(path.join(process.env.RUNNER_TEMP || os.tmpdir(), `waggle-smoke-${name}-`)); } +/** + * Best effort: a background writer of the stopped app (a model download into + * the data directory) can outlive the stop by a moment. The temp root is + * disposable, so a failed cleanup is a warning, not a failed smoke test. + */ function removeTree(dir) { - fs.rmSync(dir, { recursive: true, force: true, maxRetries: 5, retryDelay: 1000 }); + try { + fs.rmSync(dir, { recursive: true, force: true, maxRetries: 10, retryDelay: 1000 }); + } catch (error) { + log(`Warning: could not remove ${dir}: ${error instanceof Error ? error.message : String(error)}`); + } } function portIsFree(port) {