fix: resolve botched stash-pop conflict from 245e1280e
- scripts/lib/test-quarantine.json: remove stray <<<<<<< / ======= / >>>>>>> stash markers that broke JSON parsing - packages/core/src/__test-utils__/vitest-setup.ts: restore \r?\n regex and \n template escapes; drop stray extra brace
This commit is contained in:
@@ -211,8 +211,7 @@ function sweepDeadTmpdirRedirectSinks(): void {
|
||||
try {
|
||||
ownerPids = Array.from(new Set(
|
||||
readFileSync(TMPDIR_REDIRECT_REGISTRY, "utf8")
|
||||
.split(/
|
||||
?
|
||||
.split(/\r?\n/)
|
||||
.map((line) => Number.parseInt(line, 10))
|
||||
.filter((pid) => Number.isInteger(pid) && pid > 0),
|
||||
));
|
||||
@@ -249,9 +248,7 @@ function sweepDeadTmpdirRedirectSinks(): void {
|
||||
}
|
||||
|
||||
try {
|
||||
try {
|
||||
writeFileSync(TMPDIR_REDIRECT_REGISTRY, liveOwnerPids.length > 0 ? `${liveOwnerPids.join("
|
||||
")}
|
||||
writeFileSync(TMPDIR_REDIRECT_REGISTRY, liveOwnerPids.length > 0 ? `${liveOwnerPids.join("\n")}\n` : "");
|
||||
} catch {
|
||||
// Best-effort only; stale entries are harmless and swept by future workers.
|
||||
}
|
||||
@@ -264,8 +261,7 @@ function ensureTmpdirRedirectSink(): string {
|
||||
const sink = join(WORKER_ROOT, `redir-${process.pid}`);
|
||||
mkdirSync(sink, { recursive: true });
|
||||
try {
|
||||
try {
|
||||
appendFileSync(TMPDIR_REDIRECT_REGISTRY, `${process.pid}
|
||||
appendFileSync(TMPDIR_REDIRECT_REGISTRY, `${process.pid}\n`);
|
||||
} catch {
|
||||
// Best-effort only; the process exit hook and global teardown still clean up.
|
||||
}
|
||||
@@ -298,7 +294,6 @@ function redirectTmpdirPrefix<T>(prefix: T): T {
|
||||
|
||||
return join(ensureTmpdirRedirectSink(), basename(prefix)) as T;
|
||||
}
|
||||
}
|
||||
|
||||
function ensureIsolatedHome(): void {
|
||||
const existingHome = process.env.HOME ?? process.env.USERPROFILE;
|
||||
|
||||
Reference in New Issue
Block a user