MCPcopy Create free account
hub / github.com/bracesdev/errtrace / runOriginal

Method runOriginal

cmd/errtrace/toolexec.go:249–264  ·  view source on GitHub ↗
(p toolExecParams)

Source from the content-addressed store, hash-verified

247}
248
249func (cmd *mainCmd) runOriginal(p toolExecParams) (exitCode int) {
250 tool := exec.Command(p.Tool, p.ToolArgs...)
251 tool.Stdin = cmd.Stdin
252 tool.Stdout = cmd.Stdout
253 tool.Stderr = cmd.Stderr
254
255 if err := tool.Run(); err != nil {
256 if exitErr, ok := err.(*exec.ExitError); ok {
257 return exitErr.ExitCode()
258 }
259 logf(cmd.Stderr, "tool %v failed: %v", p.Tool, err)
260 return 1
261 }
262
263 return 0
264}
265
266// binaryVersion returns a string that uniquely identifies the binary.
267// We prefer to use the VCS info embedded in the build if possible

Callers 2

toolExecRewriteMethod · 0.95
rewriteCompileMethod · 0.95

Calls 2

logfFunction · 0.85
RunMethod · 0.80

Tested by

no test coverage detected