Skip to content

Commit 660bf22

Browse files
committed
fix(provider): expand ~ in CLAUDE_SECURESTORAGE_CONFIG_DIR
- It names a Claude config directory like CLAUDE_CONFIG_DIR, so a ~ path there should expand the same way before the spawn Signed-off-by: Yordis Prieto <[email protected]>
1 parent e0629a6 commit 660bf22

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

‎packages/provider-core/src/server/instanceEnvironment.test.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,14 @@ describe("mergeProviderInstanceEnvironment", () => {
1717
const baseEnv = {
1818
CODEX_HOME: "~/.inherited-codex",
1919
CLAUDE_CONFIG_DIR: "~/.inherited-claude",
20+
CLAUDE_SECURESTORAGE_CONFIG_DIR: "~/.inherited-claude-secure",
2021
GROK_HOME: "~/.inherited-grok",
2122
};
2223
const environment = yield* mergeProviderInstanceEnvironment(
2324
[
2425
{ name: "CODEX_HOME", value, sensitive: false },
2526
{ name: "CLAUDE_CONFIG_DIR", value, sensitive: false },
27+
{ name: "CLAUDE_SECURESTORAGE_CONFIG_DIR", value, sensitive: false },
2628
{ name: "GROK_HOME", value, sensitive: false },
2729
{ name: "CUSTOM_VALUE", value, sensitive: false },
2830
],
@@ -32,12 +34,14 @@ describe("mergeProviderInstanceEnvironment", () => {
3234
expect(environment).toEqual({
3335
CODEX_HOME: path.join("/home/ada", tail),
3436
CLAUDE_CONFIG_DIR: path.join("/home/ada", tail),
37+
CLAUDE_SECURESTORAGE_CONFIG_DIR: path.join("/home/ada", tail),
3538
GROK_HOME: path.join("/home/ada", tail),
3639
CUSTOM_VALUE: value,
3740
});
3841
expect(baseEnv).toEqual({
3942
CODEX_HOME: "~/.inherited-codex",
4043
CLAUDE_CONFIG_DIR: "~/.inherited-claude",
44+
CLAUDE_SECURESTORAGE_CONFIG_DIR: "~/.inherited-claude-secure",
4145
GROK_HOME: "~/.inherited-grok",
4246
});
4347
}).pipe(

‎packages/provider-core/src/server/pathExpansion.ts‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,12 @@ export function expandHomePath(value: string, home: string): string {
1111
return value;
1212
}
1313

14-
const HOME_PATH_VARIABLES = new Set(["CODEX_HOME", "CLAUDE_CONFIG_DIR", "GROK_HOME"]);
14+
const HOME_PATH_VARIABLES = new Set([
15+
"CODEX_HOME",
16+
"CLAUDE_CONFIG_DIR",
17+
"CLAUDE_SECURESTORAGE_CONFIG_DIR",
18+
"GROK_HOME",
19+
]);
1520

1621
export function expandHomeVariable(name: string, value: string, home: string): string {
1722
return HOME_PATH_VARIABLES.has(name) ? expandHomePath(value, home) : value;

0 commit comments

Comments
 (0)