mirror of
https://github.com/CharlesWiltgen/Axiom.git
synced 2026-09-20 19:58:20 +08:00
chore(axiom-pi): build the parity probe inside the try/finally
A setup failure (or a hard kill) would otherwise leave axiom-parity-probe-<pid>.swift in the shared temp root — the junk class this suite exists to guard against, and now harmless to the detector but still litter.
This commit is contained in:
@@ -467,9 +467,11 @@ describe("project detection parity with project_detect.py", () => {
|
|||||||
fs.mkdirSync(path.join(tempRepo, ".git"));
|
fs.mkdirSync(path.join(tempRepo, ".git"));
|
||||||
fs.mkdirSync(path.join(tempRepo, "ios", "App.xcodeproj"), { recursive: true });
|
fs.mkdirSync(path.join(tempRepo, "ios", "App.xcodeproj"), { recursive: true });
|
||||||
const tempProbe = path.join(os.tmpdir(), `axiom-parity-probe-${process.pid}.swift`);
|
const tempProbe = path.join(os.tmpdir(), `axiom-parity-probe-${process.pid}.swift`);
|
||||||
fs.writeFileSync(tempProbe, "");
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
// Created inside the try: a setup failure must not leave the probe behind in
|
||||||
|
// the shared temp root, which is the exact junk class this suite guards.
|
||||||
|
fs.writeFileSync(tempProbe, "");
|
||||||
const plain = dir("plain");
|
const plain = dir("plain");
|
||||||
const atCwd = dir("marker-at-cwd");
|
const atCwd = dir("marker-at-cwd");
|
||||||
file("marker-at-cwd", "Package.swift");
|
file("marker-at-cwd", "Package.swift");
|
||||||
|
|||||||
Reference in New Issue
Block a user