fix(coding-agent): canonicalized legacy AST rewrite temp root
The rewrite pipeline realpaths resolved dependency paths, so the expected specifiers must be built from the canonical temp root (macOS /var vs /private/var symlink).
This commit is contained in:
@@ -29,7 +29,8 @@ let requireTarget: string;
|
||||
const tempRoots: string[] = [];
|
||||
|
||||
beforeAll(async () => {
|
||||
rewriteRoot = await fs.mkdtemp(path.join(os.tmpdir(), "omp-legacy-ast-rewrite-"));
|
||||
// realpath: rewritten specifiers are canonical (macOS /var ↔ /private/var).
|
||||
rewriteRoot = await fs.realpath(await fs.mkdtemp(path.join(os.tmpdir(), "omp-legacy-ast-rewrite-")));
|
||||
tempRoots.push(rewriteRoot);
|
||||
const dependencyPath = path.join(rewriteRoot, "node_modules", "tracked-dep", "index.js");
|
||||
await fs.mkdir(path.dirname(dependencyPath), { recursive: true });
|
||||
|
||||
Reference in New Issue
Block a user