run kicks off a shell task and pipe the results to the respective std pipes
(cmd string, args ...string)
| 345 | |
| 346 | // run kicks off a shell task and pipe the results to the respective std pipes |
| 347 | func run(cmd string, args ...string) error { |
| 348 | c := exec.Command(cmd, args...) |
| 349 | c.Stdin = os.Stdin |
| 350 | stderr, err := c.StderrPipe() |
| 351 | if err != nil { |
| 352 | return err |
| 353 | } |
| 354 | go func() { |
| 355 | _, _ = io.Copy(os.Stderr, stderr) |
| 356 | }() |
| 357 | |
| 358 | stdout, err := c.StdoutPipe() |
| 359 | if err != nil { |
| 360 | return err |
| 361 | } |
| 362 | go func() { |
| 363 | _, _ = io.Copy(os.Stdout, stdout) |
| 364 | }() |
| 365 | return c.Run() |
| 366 | } |
| 367 | |
| 368 | func getAppURLFromArgs(c *cli.Context) (*url.URL, error) { |
| 369 | var appURLStr string |