mount all of ~/.local in sandbox for claude binary resolution

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-08 07:43:27 +00:00
co-authored by Claude Opus 4.6
parent 8377da8a77
commit 11d95a25ab
+4 -5
View File
@@ -78,11 +78,10 @@ export function buildSandboxPrefix(email: string): string[] {
// Bun runtime (e.g. /home/pastilhas/.bun)
args.push('--ro-bind', BUN_DIR, BUN_DIR);
// npm global packages (~/.local/lib) — pi and its dependencies
const localLib = join(homeDir, '.local', 'lib');
if (existsSync(localLib)) {
args.push('--perms', '0755', '--dir', join(homeDir, '.local'));
args.push('--ro-bind', localLib, localLib);
// User-local installs (~/.local) — claude binary, pi npm packages, etc.
const localDir = join(homeDir, '.local');
if (existsSync(localDir)) {
args.push('--ro-bind', localDir, localDir);
}
// Project source (for MCP server)