From ae8d119eeb7449edd38fd00f68ce924c704aa95e Mon Sep 17 00:00:00 2001 From: Tim Fish Date: Sun, 22 Dec 2024 15:25:12 +0000 Subject: [PATCH] fix(node): Ensure NODE_OPTIONS is not passed to worker threads --- packages/node/src/integrations/anr/index.ts | 1 + .../src/integrations/local-variables/local-variables-async.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/node/src/integrations/anr/index.ts b/packages/node/src/integrations/anr/index.ts index b71bdfa49c52..aa903789ad12 100644 --- a/packages/node/src/integrations/anr/index.ts +++ b/packages/node/src/integrations/anr/index.ts @@ -176,6 +176,7 @@ async function _startWorker( workerData: options, // We don't want any Node args to be passed to the worker execArgv: [], + env: { ...process.env, NODE_OPTIONS: undefined }, }); process.on('exit', () => { diff --git a/packages/node/src/integrations/local-variables/local-variables-async.ts b/packages/node/src/integrations/local-variables/local-variables-async.ts index e1e0ebadf755..c3dcb1d12450 100644 --- a/packages/node/src/integrations/local-variables/local-variables-async.ts +++ b/packages/node/src/integrations/local-variables/local-variables-async.ts @@ -81,6 +81,7 @@ export const localVariablesAsyncIntegration = defineIntegration((( workerData: options, // We don't want any Node args to be passed to the worker execArgv: [], + env: { ...process.env, NODE_OPTIONS: undefined }, }); process.on('exit', () => {