MCPcopy
hub / github.com/smallstep/cli / Exec

Function Exec

exec/exec.go:41–50  ·  view source on GitHub ↗

Exec is wrapper over syscall.Exec, invokes the execve(2) system call. On windows it executes Run with the same arguments.

(name string, arg ...string)

Source from the content-addressed store, hash-verified

39// Exec is wrapper over syscall.Exec, invokes the execve(2) system call. On
40// windows it executes Run with the same arguments.
41func Exec(name string, arg ...string) {
42 if runtime.GOOS == "windows" {
43 Run(name, arg...)
44 return
45 }
46 args := append([]string{name}, arg...)
47 if err := sysutils.Exec(name, args, os.Environ()); err != nil {
48 errorAndExit(name, err)
49 }
50}
51
52// Run is a wrapper over os/exec Cmd.Run that configures Stderr/Stdin/Stdout
53// to the current ones and wait until the process finishes, exiting with the

Callers 1

proxyBastionFunction · 0.92

Calls 3

ExecFunction · 0.92
errorAndExitFunction · 0.85
RunFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…