MCPcopy Create free account
hub / github.com/diillson/chatcli / CaptureOutput

Method CaptureOutput

cli/agent/command_executor.go:298–304  ·  view source on GitHub ↗

CaptureOutput executa comando e captura apenas a saída (para uso interno)

(ctx context.Context, shell string, args []string)

Source from the content-addressed store, hash-verified

296
297// CaptureOutput executa comando e captura apenas a saída (para uso interno)
298func (e *CommandExecutor) CaptureOutput(ctx context.Context, shell string, args []string) ([]byte, error) {
299 cmd := exec.CommandContext(ctx, shell, args...) //#nosec G204 -- agent/CLI tool execution; commands validated by command_validator + policy_manager upstream
300 cmd.Stdin = os.Stdin
301
302 output, err := cmd.CombinedOutput()
303 return output, err
304}

Callers 1

simulateCommandBlockMethod · 0.80

Implementers 2

MockCommandExecutorutils/git_utils_test.go
OSCommandExecutorutils/exec_utils.go

Calls

no outgoing calls

Tested by

no test coverage detected