* This isn't working as intended, its working, just not how I imagined it. */
(target *configuration.Target, path string)
| 147 | */ |
| 148 | |
| 149 | func runBinary(target *configuration.Target, path string) (*exec.Cmd, error) { |
| 150 | flags := target.BuildFlags() |
| 151 | |
| 152 | cmd := exec.Command(path, flags...) |
| 153 | log.Debug(cmd.Args) |
| 154 | |
| 155 | err := cmd.Start() |
| 156 | if err != nil { |
| 157 | log.Debug(err) |
| 158 | return nil, errors.New("Could not start Hoverfly") |
| 159 | } |
| 160 | |
| 161 | return cmd, nil |
| 162 | } |
| 163 | |
| 164 | func Start(target *configuration.Target) error { |
| 165 | // TODO only check port if is it localhost |
no test coverage detected