Skip to content

Function: resolveWorktreeEnvAndCwd() ​

ts
function resolveWorktreeEnvAndCwd(
   scopeHandle, 
   envConfig?, 
   resolveEnv
): ResolvedSubprocessEnvironment;

Defined in: node/src/executors/internal/process-group-lifecycle.ts:80

Resolves the subprocess working directory and environment map from the active scopeHandle and envConfig.

Injects cwd: worktreePath and all 9 isolated GIT_* environment variables when scopeHandle exposes a non-empty worktreePath, and resolves symbolic EnvRef entries via resolveEnv.

Parameters ​

ParameterTypeDescription
scopeHandleunknownActive isolation scope handle.
envConfig?Readonly<Record<string, string | EnvRef>>Optional command or check environment bindings.
resolveEnv?(value) => string | undefinedRuntime EnvRef resolver callback.

Returns ​

ResolvedSubprocessEnvironment

Resolved cwd, env, and optional worktreePath.

Throws ​

If a symbolic EnvRef resolves to undefined or an empty string.

Released under the MIT License.