MCPcopy Index your code
hub / github.com/cloudflare/cloudflared / run

Function run

cmd/cloudflared/access/cmd.go:347–366  ·  view source on GitHub ↗

run kicks off a shell task and pipe the results to the respective std pipes

(cmd string, args ...string)

Source from the content-addressed store, hash-verified

345
346// run kicks off a shell task and pipe the results to the respective std pipes
347func 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
368func getAppURLFromArgs(c *cli.Context) (*url.URL, error) {
369 var appURLStr string

Callers 1

curlFunction · 0.85

Calls 1

RunMethod · 0.65

Tested by

no test coverage detected