mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-26 17:32:16 +00:00
17 lines
458 B
TypeScript
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;
|
|
}
|