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

Function RunCommand

pkg/exec/exec.go:57–67  ·  view source on GitHub ↗

RunCommand runs a command on the host system. returns the stdout of the command and an err

(command string, args []string)

Source from the content-addressed store, hash-verified

55// RunCommand runs a command on the host system.
56// returns the stdout of the command and an err
57func RunCommand(command string, args []string) (string, error) {
58 out, err := HostCommand(
59 command, args...,
60 ).CombinedOutput()
61
62 output.UserOut.WithFields(output.Fields{
63 "Result": string(out),
64 }).Debug("Command ")
65
66 return string(out), err
67}
68
69// RunCommandPipe runs a command on the host system
70// Returns combined output as string, and error

Callers 15

TestGetFreePortFunction · 0.92
TestExtraPackagesFunction · 0.92
GetInfoMethod · 0.92
TestGetInactiveProjectsFunction · 0.92
TestAcquiaPullFunction · 0.92
TestExtraPortExposeFunction · 0.92
TestComposeWithStreamsFunction · 0.92
TestValidTestSiteFunction · 0.92
TestGetLocalHTTPResponseFunction · 0.92
TestPretestAndEnvFunction · 0.92
TestCmdXdebugDiagnoseFunction · 0.92
TestCmdConfigHooksFunction · 0.92

Calls 1

HostCommandFunction · 0.85

Tested by 15

TestGetFreePortFunction · 0.74
TestExtraPackagesFunction · 0.74
TestGetInactiveProjectsFunction · 0.74
TestAcquiaPullFunction · 0.74
TestExtraPortExposeFunction · 0.74
TestComposeWithStreamsFunction · 0.74
TestValidTestSiteFunction · 0.74
TestGetLocalHTTPResponseFunction · 0.74
TestPretestAndEnvFunction · 0.74
TestCmdXdebugDiagnoseFunction · 0.74
TestCmdConfigHooksFunction · 0.74