MCPcopy Create free account
hub / github.com/cli/cli / cmdRun

Function cmdRun

script/ghmock/run.go:136–153  ·  view source on GitHub ↗
(args []string, stdout, stderr io.Writer)

Source from the content-addressed store, hash-verified

134}
135
136func cmdRun(args []string, stdout, stderr io.Writer) error {
137 opts, err := parseRunArgs(args)
138 if err != nil {
139 return err
140 }
141 st, err := openState()
142 if err != nil {
143 return err
144 }
145 chk := newChecker(stderr)
146 chk.preload()
147 rec, _, err := runAll(st, chk, opts)
148 if err != nil {
149 return err
150 }
151 fmt.Fprint(stdout, rec.Report)
152 return nil
153}
154
155// runAll runs each binary in turn and appends its requests to the log. It
156// then saves the run and its report for ghmock export. A nil checker turns

Callers 1

runMainFunction · 0.85

Calls 5

parseRunArgsFunction · 0.85
openStateFunction · 0.85
newCheckerFunction · 0.85
runAllFunction · 0.85
preloadMethod · 0.80

Tested by

no test coverage detected