Dashboard › sentry-api-schema › getsentry/cli uses setEnv/getEnv for en…
019de1e9-ce08-7b44-bff2-3de8729e0f93The repo isolates environment variables via src/lib/env.ts — setEnv(env) overrides the active env, getEnv() returns it. Tests that depend on env vars should call setEnv({ VAR: 'val' } as NodeJS.ProcessEnv) and restore with setEnv(process.env) in a try/finally. Detection functions like detectAgent() read from getEnv(), not process.env directly.