MCPcopy
hub / github.com/git-lfs/git-lfs / ExecCommand

Function ExecCommand

subprocess/subprocess_nix.go:11–20  ·  view source on GitHub ↗

ExecCommand is a small platform specific wrapper around os/exec.Command

(name string, arg ...string)

Source from the content-addressed store, hash-verified

9
10// ExecCommand is a small platform specific wrapper around os/exec.Command
11func ExecCommand(name string, arg ...string) (*Cmd, error) {
12 cmd := exec.Command(name, arg...)
13 var err error
14 cmd.Path, err = LookPath(name)
15 if err != nil {
16 return nil, err
17 }
18 cmd.Env = fetchEnvironment()
19 return newCmd(cmd), nil
20}

Callers 3

BufferedExecFunction · 0.70
StdoutBufferedExecFunction · 0.70
SimpleExecFunction · 0.70

Calls 3

LookPathFunction · 0.85
fetchEnvironmentFunction · 0.85
newCmdFunction · 0.85

Tested by

no test coverage detected