Repository navigation
Conversation
|
The This fixes the issue for go specifically by changing the tempdir that is being written to the cwd (which is not symlinked), but it does not fix the underlying root cause of: Why, if it was allowlisted, is the system tmp dir not writeable? codex/codex-cli/src/utils/agent/exec.ts Lines 38 to 45 in ae5b1b5 I think I fixed that in #275 |
|
Thank you for the detailed explanation! I now understand that PR #275 solves the root issue by canonicalizing paths with This is indeed a more elegant and comprehensive solution than my Go-specific approach. The difference between I'll abandon my solution in favor of PR #275 which addresses the fundamental problem for all tools, not just Go. On another note, I'm considering proposing a modernization of the monorepo with pnpm and Turborepo to improve the development experience. Do you think this would be a useful contribution to the project? |
|
Cut an issue for it @alphajoop is my advice. Ive seen it discussed, so to not duplicate efforts I'd suggest an issue for it. |
|
I am in favor of this
but indeed post this as an issue and let's discuss there. |
|
Closing this PR as the change is too invasive and we have a different approach by @jonchurch that we'll likely merge shortly. |
Fix: Adapt Go commands for macOS sandbox compatibility
Issue
This PR addresses issue #207 "Full auto mode cannot build Go code" where users on macOS encounter permission errors when running Go commands in full-auto mode: go: creating work dir: mkdir /var/folders/zv/b1sjg_v16tn6dpgblz8v4ls40000gn/T/go-build3375040063: operation not permitted
Root Cause
The issue occurs because:
sandbox-exec) on macOS for sandboxingSolution
This PR implements a platform-specific adaptation for Go commands on macOS:
.tmpdirectory in the current working directory (which is writable in the sandbox)GOTMPDIRenvironment variable to point to this directoryImplementation Details
adaptGoCommandForSandboxfunction inplatform-commands.tsadaptCommandForPlatformfunction to check for Go commands firstTesting
GOTMPDIRenvironment variable.Additional Notes
This approach:
Screenshots
N/A
Checklist