fix: remap host paths to container mount points for EJCLAW_WORK_DIR and CLAUDE_CONFIG_DIR

Host paths passed via envOverrides don't exist inside the container,
causing ENOENT when the SDK tries to spawn with a non-existent CWD.
Now remaps EJCLAW_WORK_DIR to /workspace/project and CLAUDE_CONFIG_DIR
to /home/node/.claude (matching the container mount points).
This commit is contained in:
Eyejoker
2026-03-29 23:52:32 +09:00
parent 29ab284c60
commit 6036fd988b

View File

@@ -234,6 +234,15 @@ function buildContainerArgs(
key === 'CLAUDE_CODE_OAUTH_TOKEN'
)
continue;
// Remap host paths to container mount points
if (key === 'EJCLAW_WORK_DIR') {
args.push('-e', 'EJCLAW_WORK_DIR=/workspace/project');
continue;
}
if (key === 'CLAUDE_CONFIG_DIR') {
args.push('-e', 'CLAUDE_CONFIG_DIR=/home/node/.claude');
continue;
}
args.push('-e', `${key}=${value}`);
}
}