MCPcopy Index your code
hub / github.com/perkeep/perkeep / runExec

Function runExec

pkg/cmdmain/cmdmain.go:393–403  ·  view source on GitHub ↗

runExec execs bin. If the platform doesn't support exec, it runs it and waits for it to finish.

(bin string, args []string, e *env)

Source from the content-addressed store, hash-verified

391// runExec execs bin. If the platform doesn't support exec, it runs it and waits
392// for it to finish.
393func runExec(bin string, args []string, e *env) error {
394 if sysExec != nil {
395 return sysExec(bin, append([]string{filepath.Base(bin)}, args...), e.flat())
396 }
397
398 cmd := exec.Command(bin, args...)
399 cmd.Env = e.flat()
400 cmd.Stdout = Stdout
401 cmd.Stderr = Stderr
402 return cmd.Run()
403}
404
405type env struct {
406 m map[string]string

Callers 1

runAsNewCommandFunction · 0.70

Calls 3

flatMethod · 0.80
CommandMethod · 0.65
RunMethod · 0.65

Tested by

no test coverage detected