Fix swc test path from node_modules (#66047)
Noticed while testing turbopack version of tests that we weren't loading the correct swc binary since this path wasn't absolute and was just the relative path in `node_modules`. --------- Co-authored-by: Zack Tanner <1939140+ztanner@users.noreply.github.com>
This commit is contained in:
parent
93303b41b9
commit
1ad97e42f2
1 changed files with 10 additions and 1 deletions
|
@ -100,9 +100,18 @@ async function createNextInstall({
|
|||
const swcDirectory = fs
|
||||
.readdirSync(path.join(origRepoDir, 'node_modules/@next'))
|
||||
.find((directory) => directory.startsWith('swc-'))
|
||||
process.env.NEXT_TEST_NATIVE_DIR = swcDirectory
|
||||
process.env.NEXT_TEST_NATIVE_DIR = path.join(
|
||||
origRepoDir,
|
||||
'node_modules/@next',
|
||||
swcDirectory
|
||||
)
|
||||
}
|
||||
|
||||
// log for clarity of which version we're using
|
||||
require('console').log({
|
||||
swcDirectory: process.env.NEXT_TEST_NATIVE_DIR,
|
||||
})
|
||||
|
||||
pkgPaths = await rootSpan
|
||||
.traceChild('linkPackages')
|
||||
.traceAsyncFn((span) =>
|
||||
|
|
Loading…
Reference in a new issue