Skip to content

Commit

Permalink
only override NODE_EXTRA_CA_CERTS when using experimental https flag (#…
Browse files Browse the repository at this point in the history
…56252)

This was unintentionally preventing this flag from being sent on `process.env` even if you weren't using `--experimental-https`. 

[x-ref](#55775 (comment))
  • Loading branch information
ztanner authored Sep 30, 2023
1 parent 3b8a8f5 commit cb8b3a2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/next/src/cli/next-dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,14 +245,17 @@ const nextDev: CliCommand = async (args) => {
async function startServer(options: StartServerOptions) {
return new Promise<void>((resolve) => {
let resolved = false
const defaultEnv = (initialEnv || process.env) as typeof process.env

child = fork(startServerPath, {
stdio: 'inherit',
env: {
...((initialEnv || process.env) as typeof process.env),
...defaultEnv,
TURBOPACK: process.env.TURBOPACK,
NEXT_PRIVATE_WORKER: '1',
NODE_EXTRA_CA_CERTS: options.selfSignedCertificate?.rootCA,
NODE_EXTRA_CA_CERTS: options.selfSignedCertificate
? options.selfSignedCertificate.rootCA
: defaultEnv.NODE_EXTRA_CA_CERTS,
},
})

Expand Down

0 comments on commit cb8b3a2

Please sign in to comment.