diff options
Diffstat (limited to 'Omni/Agent/Subagent')
| -rw-r--r-- | Omni/Agent/Subagent/Coder.hs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Omni/Agent/Subagent/Coder.hs b/Omni/Agent/Subagent/Coder.hs index 63273f6..65abcc9 100644 --- a/Omni/Agent/Subagent/Coder.hs +++ b/Omni/Agent/Subagent/Coder.hs @@ -138,11 +138,16 @@ defaultCoderConfig namespace task = coderMaxVerifyRetries = 2 } +-- | The omni repo directory where Coder runs all commands +omniRepoDir :: FilePath +omniRepoDir = "/home/ava/omni" + -- | Run a bash command and capture output -- Uses direnv exec to ensure the nix shell environment is loaded +-- Always runs in the omni repo directory runBashCapture :: Text -> IO (Exit.ExitCode, Text, Text) runBashCapture cmd = do - (code, out, err) <- Process.readProcessWithExitCode "direnv" ["exec", ".", "bash", "-c", Text.unpack cmd] "" + (code, out, err) <- Process.readProcessWithExitCode "direnv" ["exec", omniRepoDir, "bash", "-c", Text.unpack cmd] "" pure (code, Text.pack out, Text.pack err) -- | Phase 1: Initialize - check environment, detect broken state |
