Unverified Commit 26ad61a9 authored by Ethan Arrowood's avatar Ethan Arrowood Committed by GitHub

Fix `NEXT_SKIP_ISOLATE=1` log for testing (#65590)

This log was firing even when the env var is specified. Now it only logs
when appropriate.
parent 64878739
......@@ -140,14 +140,16 @@ export class NextInstance {
if (this.isDestroyed) {
throw new Error('next instance already destroyed')
}
require('console').log(
`Creating test directory with isolated next... (use NEXT_SKIP_ISOLATE=1 to opt-out)`
)
await parentSpan
.traceChild('createTestDir')
.traceAsyncFn(async (rootSpan) => {
const skipIsolatedNext = !!process.env.NEXT_SKIP_ISOLATE
if (!skipIsolatedNext) {
require('console').log(
`Creating test directory with isolated next... (use NEXT_SKIP_ISOLATE=1 to opt-out)`
)
}
const tmpDir = skipIsolatedNext
? path.join(__dirname, '../../tmp')
: process.env.NEXT_TEST_DIR || (await fs.realpath(os.tmpdir()))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment