(p toolExecParams)
| 247 | } |
| 248 | |
| 249 | func (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 |
no test coverage detected