Skip to content

Function: childEnv()

childEnv(extra?): ProcessEnv

process.env plus the runtime executable directory and registry aliases.

The executable directory matters when this CLI was launched by absolute path: bun runs, but a lifecycle script that invokes bun/node by bare name would otherwise fail with command not found. Prepending dirname(process.execPath) (the running bun binary’s dir) puts the runtime back on PATH.

Record<string, string>

ProcessEnv