@@ -12,6 +12,7 @@ import (
1212
1313 "github.com/aoagents/agent-orchestrator/backend/internal/domain"
1414 "github.com/aoagents/agent-orchestrator/backend/internal/ports"
15+ aoprocess "github.com/aoagents/agent-orchestrator/backend/internal/process"
1516)
1617
1718const (
@@ -281,14 +282,14 @@ func (w *Workspace) StashUncommitted(ctx context.Context, info ports.WorkspaceIn
281282
282283 // Stage all tracked and non-ignored untracked files into the temp index.
283284 // GIT_INDEX_FILE overrides the index so the real index is never touched.
284- addCmd := exec .CommandContext (ctx , w .binary , addAllTempIndexArgs (info .Path )... )
285+ addCmd := aoprocess .CommandContext (ctx , w .binary , addAllTempIndexArgs (info .Path )... )
285286 addCmd .Env = append (os .Environ (), "GIT_INDEX_FILE=" + tmpIdxPath )
286287 if out , err := addCmd .CombinedOutput (); err != nil {
287288 return "" , commandError {args : append ([]string {w .binary }, addAllTempIndexArgs (info .Path )... ), output : string (out ), err : err }
288289 }
289290
290291 // Write the staged tree to get a tree SHA.
291- writeTreeCmd := exec .CommandContext (ctx , w .binary , writeTreeArgs (info .Path )... )
292+ writeTreeCmd := aoprocess .CommandContext (ctx , w .binary , writeTreeArgs (info .Path )... )
292293 writeTreeCmd .Env = append (os .Environ (), "GIT_INDEX_FILE=" + tmpIdxPath )
293294 treeOut , err := writeTreeCmd .CombinedOutput ()
294295 if err != nil {
@@ -402,7 +403,7 @@ func (w *Workspace) ApplyPreserved(ctx context.Context, info ports.WorkspaceInfo
402403// returned commandError. Exit code detection happens in the caller.
403404func (w * Workspace ) runCherryPickNoCommit (ctx context.Context , worktree , commitSHA string ) error {
404405 args := cherryPickNoCommitArgs (worktree , commitSHA )
405- cmd := exec .CommandContext (ctx , w .binary , args ... )
406+ cmd := aoprocess .CommandContext (ctx , w .binary , args ... )
406407 out , err := cmd .CombinedOutput ()
407408 if err != nil {
408409 return commandError {args : append ([]string {w .binary }, args ... ), output : string (out ), err : err }
@@ -752,7 +753,7 @@ func pathExistsNonEmpty(path string) (bool, error) {
752753}
753754
754755func runCommand (ctx context.Context , binary string , args ... string ) ([]byte , error ) {
755- cmd := exec .CommandContext (ctx , binary , args ... )
756+ cmd := aoprocess .CommandContext (ctx , binary , args ... )
756757 out , err := cmd .CombinedOutput ()
757758 if err != nil {
758759 return out , commandError {args : append ([]string {binary }, args ... ), output : string (out ), err : err }
0 commit comments