Files
openclaw/src/infra/openclaw-exec-env.ts

17 lines
458 B
TypeScript

export const OPENCLAW_CLI_ENV_VAR = "OPENCLAW_CLI";
export const OPENCLAW_CLI_ENV_VALUE = "1";
export function markOpenClawExecEnv<T extends Record<string, string | undefined>>(env: T): T {
return {
...env,
[OPENCLAW_CLI_ENV_VAR]: OPENCLAW_CLI_ENV_VALUE,
};
}
export function ensureOpenClawExecMarkerOnProcess(
env: NodeJS.ProcessEnv = process.env,
): NodeJS.ProcessEnv {
env[OPENCLAW_CLI_ENV_VAR] = OPENCLAW_CLI_ENV_VALUE;
return env;
}