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

Function Run

exec/exec.go:56–69  ·  view source on GitHub ↗

Run is a wrapper over os/exec Cmd.Run that configures Stderr/Stdin/Stdout to the current ones and wait until the process finishes, exiting with the same code. Run will also forward all the signals sent to step to the command.

(name string, arg ...string)

Source from the content-addressed store, hash-verified

54// same code. Run will also forward all the signals sent to step to the
55// command.
56func Run(name string, arg ...string) {
57 cmd, exitCh, err := run(name, arg...)
58 if err != nil {
59 errorAndExit(name, err)
60 }
61
62 if err = cmd.Wait(); err != nil {
63 errorf(name, err)
64 }
65
66 // exit and wait until os.Exit
67 exitCh <- getExitStatus(cmd)
68 exitCh <- 0
69}
70
71// RunWithPid calls Run and writes the process ID in pidFile.
72func RunWithPid(pidFile, name string, arg ...string) {

Callers 1

ExecFunction · 0.70

Calls 4

errorAndExitFunction · 0.85
errorfFunction · 0.85
getExitStatusFunction · 0.85
runFunction · 0.70

Tested by

no test coverage detected