fix: isolate docs i18n codex home · openclaw/openclaw@4d69f81
steipete
·
2026-04-28
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -179,6 +179,12 @@ func runCodexExecPrompt(ctx context.Context, req codexPromptRequest) (string, er
|
179 | 179 | _ = outputFile.Close() |
180 | 180 | defer os.Remove(outputPath) |
181 | 181 | |
| 182 | +codexHome, err := os.MkdirTemp("", "openclaw-docs-i18n-codex-home-*") |
| 183 | +if err != nil { |
| 184 | +return "", err |
| 185 | + } |
| 186 | +defer os.RemoveAll(codexHome) |
| 187 | + |
182 | 188 | args := []string{ |
183 | 189 | "exec", |
184 | 190 | "--model", req.Model, |
@@ -191,6 +197,7 @@ func runCodexExecPrompt(ctx context.Context, req codexPromptRequest) (string, er
|
191 | 197 | } |
192 | 198 | command := exec.CommandContext(ctx, docsCodexExecutable(), args...) |
193 | 199 | command.Stdin = strings.NewReader(buildCodexTranslationPrompt(req.SystemPrompt, req.Message)) |
| 200 | +command.Env = append(os.Environ(), "CODEX_HOME="+codexHome) |
194 | 201 | var stdout bytes.Buffer |
195 | 202 | var stderr bytes.Buffer |
196 | 203 | command.Stdout = &stdout |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。