mirror of
https://github.com/anthropic-experimental/sandbox-runtime.git
synced 2026-06-09 19:46:45 +08:00
Merge pull request #84 from anthropic-experimental/jacques/respect-tmpdir-in-srt
Reuse `process.env.TMPDIR` if set
This commit is contained in:
2
package-lock.json
generated
2
package-lock.json
generated
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@anthropic-ai/sandbox-runtime",
|
||||
"version": "0.0.25",
|
||||
"version": "0.0.26",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@anthropic-ai/sandbox-runtime",
|
||||
"version": "0.0.25",
|
||||
"version": "0.0.26",
|
||||
"description": "Anthropic Sandbox Runtime (ASRT) - A general-purpose tool for wrapping security boundaries around arbitrary processes",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
|
||||
@@ -298,7 +298,9 @@ export function generateProxyEnvVars(
|
||||
httpProxyPort?: number,
|
||||
socksProxyPort?: number,
|
||||
): string[] {
|
||||
const envVars: string[] = [`SANDBOX_RUNTIME=1`, `TMPDIR=/tmp/claude`]
|
||||
// Respect CLAUDE_TMPDIR if set, otherwise default to /tmp/claude
|
||||
const tmpdir = process.env.CLAUDE_TMPDIR || '/tmp/claude'
|
||||
const envVars: string[] = [`SANDBOX_RUNTIME=1`, `TMPDIR=${tmpdir}`]
|
||||
|
||||
// If no proxy ports provided, return minimal env vars
|
||||
if (!httpProxyPort && !socksProxyPort) {
|
||||
|
||||
Reference in New Issue
Block a user