mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 05:21:23 +00:00
fix: pass sandbox docker env into containers (#15138) (thanks @stevebot-alive)
This commit is contained in:
@@ -78,6 +78,7 @@ describe("buildSandboxCreateArgs", () => {
|
||||
"1.5",
|
||||
]),
|
||||
);
|
||||
expect(args).toEqual(expect.arrayContaining(["--env", "LANG=C.UTF-8"]));
|
||||
|
||||
const ulimitValues: string[] = [];
|
||||
for (let i = 0; i < args.length; i += 1) {
|
||||
|
||||
@@ -156,7 +156,9 @@ export function buildSandboxCreateArgs(params: {
|
||||
args.push("--user", params.cfg.user);
|
||||
}
|
||||
for (const [key, value] of Object.entries(params.cfg.env ?? {})) {
|
||||
if (!key.trim()) continue;
|
||||
if (!key.trim()) {
|
||||
continue;
|
||||
}
|
||||
args.push("--env", key + "=" + value);
|
||||
}
|
||||
for (const cap of params.cfg.capDrop) {
|
||||
|
||||
Reference in New Issue
Block a user