Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions packages/provider-core/src/server/instanceEnvironment.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,12 @@ describe("mergeProviderInstanceEnvironment", () => {
const baseEnv = {
CODEX_HOME: "~/.inherited-codex",
CLAUDE_CONFIG_DIR: "~/.inherited-claude",
CLAUDE_SECURESTORAGE_CONFIG_DIR: "~/.inherited-claude-secure",
GROK_HOME: "~/.inherited-grok",
};
const environment = yield* mergeProviderInstanceEnvironment(
[
{ name: "CODEX_HOME", value, sensitive: false },
{ name: "CLAUDE_CONFIG_DIR", value, sensitive: false },
{ name: "CLAUDE_SECURESTORAGE_CONFIG_DIR", value, sensitive: false },
{ name: "GROK_HOME", value, sensitive: false },
{ name: "CUSTOM_VALUE", value, sensitive: false },
],
Expand All @@ -43,15 +41,13 @@ describe("mergeProviderInstanceEnvironment", () => {
expect(environment).toEqual({
CODEX_HOME: path.join("/home/ada", tail),
CLAUDE_CONFIG_DIR: path.join("/home/ada", tail),
CLAUDE_SECURESTORAGE_CONFIG_DIR: path.join("/home/ada", tail),
GROK_HOME: path.join("/home/ada", tail),
CUSTOM_VALUE: value,
OTEL_RESOURCE_ATTRIBUTES: LAUNCHED,
});
expect(baseEnv).toEqual({
CODEX_HOME: "~/.inherited-codex",
CLAUDE_CONFIG_DIR: "~/.inherited-claude",
CLAUDE_SECURESTORAGE_CONFIG_DIR: "~/.inherited-claude-secure",
GROK_HOME: "~/.inherited-grok",
});
}).pipe(
Expand Down
7 changes: 1 addition & 6 deletions packages/provider-core/src/server/pathExpansion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,7 @@ export function expandHomePath(value: string, home: string): string {
return value;
}

const HOME_PATH_VARIABLES = new Set([
"CODEX_HOME",
"CLAUDE_CONFIG_DIR",
"CLAUDE_SECURESTORAGE_CONFIG_DIR",
"GROK_HOME",
]);
const HOME_PATH_VARIABLES = new Set(["CODEX_HOME", "CLAUDE_CONFIG_DIR", "GROK_HOME"]);

export function expandHomeVariable(name: string, value: string, home: string): string {
return HOME_PATH_VARIABLES.has(name) ? expandHomePath(value, home) : value;
Expand Down
Loading