summaryrefslogtreecommitdiff
path: root/Omni/Agent/Subagent/Coder.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Omni/Agent/Subagent/Coder.hs')
-rw-r--r--Omni/Agent/Subagent/Coder.hs3
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