MCPcopy Index your code
hub / github.com/ddev/ddev / RunCommandPipe

Function RunCommandPipe

pkg/exec/exec.go:71–79  ·  view source on GitHub ↗

RunCommandPipe runs a command on the host system Returns combined output as string, and error

(command string, args []string)

Source from the content-addressed store, hash-verified

69// RunCommandPipe runs a command on the host system
70// Returns combined output as string, and error
71func RunCommandPipe(command string, args []string) (string, error) {
72 output.UserOut.WithFields(output.Fields{
73 "Command": command + " " + strings.Join(args[:], " "),
74 }).Info("Running ")
75
76 cmd := HostCommand(command, args...)
77 stdoutStderr, err := cmd.CombinedOutput()
78 return string(stdoutStderr), err
79}
80
81// RunInteractiveCommand runs a command on the host system interactively, with stdin/stdout/stderr connected
82// Returns error

Callers 2

TestDdevDescribeFunction · 0.92
TestComposeWithStreamsFunction · 0.92

Calls 1

HostCommandFunction · 0.85

Tested by 2

TestDdevDescribeFunction · 0.74
TestComposeWithStreamsFunction · 0.74