diff options
| author | Ben Sima <ben@bensima.com> | 2025-12-25 23:13:04 -0500 |
|---|---|---|
| committer | Ben Sima <ben@bensima.com> | 2025-12-25 23:13:04 -0500 |
| commit | a4108a484a1c5e83f926b84899fe228d59e5ea18 (patch) | |
| tree | c38bb0756d5dec0a7b89005354d1b78e5eebfb47 /Omni/Agent | |
| parent | 0821ee63521f18d7d98efab7e13d812149f0b33c (diff) | |
Omni/Agent/Subagent/Coder: fix direnv exec path handling
Use `cd <path> && direnv exec .` instead of `direnv exec <path>` since
the latter doesn't work correctly with nix-direnv caching.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Diffstat (limited to 'Omni/Agent')
| -rw-r--r-- | Omni/Agent/Subagent/Coder.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Omni/Agent/Subagent/Coder.hs b/Omni/Agent/Subagent/Coder.hs index 65abcc9..8924c2c 100644 --- a/Omni/Agent/Subagent/Coder.hs +++ b/Omni/Agent/Subagent/Coder.hs @@ -147,7 +147,8 @@ omniRepoDir = "/home/ava/omni" -- Always runs in the omni repo directory runBashCapture :: Text -> IO (Exit.ExitCode, Text, Text) runBashCapture cmd = do - (code, out, err) <- Process.readProcessWithExitCode "direnv" ["exec", omniRepoDir, "bash", "-c", Text.unpack cmd] "" + let fullCmd = "cd " <> Text.pack omniRepoDir <> " && direnv exec . bash -c " <> quoteShell cmd + (code, out, err) <- Process.readProcessWithExitCode "bash" ["-c", Text.unpack fullCmd] "" pure (code, Text.pack out, Text.pack err) -- | Phase 1: Initialize - check environment, detect broken state |
