deno/tests/specs/compile/code_cache/cleanup.ts
Laurence Rowe e421451a70
Some checks are pending
ci / pre-build (push) Waiting to run
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / build libs (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions
fix(tests): use correct path separator on unix for code_cache cleanup.ts (#30378)
This has been causing failures on multiple PRs.
2025-08-12 09:20:52 -07:00

11 lines
305 B
TypeScript

import { tmpdir } from "node:os";
// cleanup the code cache file from a previous run
try {
if (Deno.build.os === "windows") {
Deno.removeSync(tmpdir() + "\\deno-compile-using_code_cache.exe.cache");
} else {
Deno.removeSync(tmpdir() + "/deno-compile-using_code_cache.cache");
}
} catch {
}