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

Function ExecCommand

subprocess/subprocess_windows.go:12–22  ·  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

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

Callers 15

isCygwinFunction · 0.92
translateCygwinPathFunction · 0.92
pipeExtensionsFunction · 0.92
cleanRootPathFunction · 0.92
processFilesFunction · 0.92
postCloneSubmodulesFunction · 0.92
gitNoLFSFunction · 0.92
gitFunction · 0.92
gitConfigMethod · 0.92
startConnectionFunction · 0.92
getFromProgramMethod · 0.92
execMethod · 0.92

Calls 3

LookPathFunction · 0.85
fetchEnvironmentFunction · 0.85
newCmdFunction · 0.85

Tested by

no test coverage detected