Always respect NEXT_TRACE_UPLOAD_DISABLED (#61402)

Closes PACK-2326
This commit is contained in:
Will Binns-Smith 2024-01-30 10:58:36 -08:00 committed by GitHub
parent 9c35f21f38
commit 332720a3e9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -205,7 +205,10 @@ const nextDev: CliCommand = async (args) => {
const isExperimentalTestProxy = args['--experimental-test-proxy'] const isExperimentalTestProxy = args['--experimental-test-proxy']
if (args['--experimental-upload-trace']) { if (
args['--experimental-upload-trace'] &&
!process.env.NEXT_TRACE_UPLOAD_DISABLED
) {
traceUploadUrl = args['--experimental-upload-trace'] traceUploadUrl = args['--experimental-upload-trace']
} }
@ -292,7 +295,7 @@ const nextDev: CliCommand = async (args) => {
// Starting the dev server will overwrite the `.next/trace` file, so we // Starting the dev server will overwrite the `.next/trace` file, so we
// must upload the existing contents before restarting the server to // must upload the existing contents before restarting the server to
// preserve the metrics. // preserve the metrics.
if (traceUploadUrl && !process.env.NEXT_TRACE_UPLOAD_DISABLED) { if (traceUploadUrl) {
uploadTrace({ uploadTrace({
traceUploadUrl, traceUploadUrl,
mode: 'dev', mode: 'dev',