MCPcopy Create free account
hub / github.com/ddev/ddev / WithStdin

Function WithStdin

pkg/exec/exec.go:22–29  ·  view source on GitHub ↗

WithStdin sets the stdin for the host command

(stdin io.Reader)

Source from the content-addressed store, hash-verified

20
21// WithStdin sets the stdin for the host command
22func WithStdin(stdin io.Reader) CmdOption {
23 return func(cmd *exec.Cmd) {
24 if globalconfig.DdevVerbose {
25 output.UserOut.Printf("WithStdin: setting custom stdin")
26 }
27 cmd.Stdin = stdin
28 }
29}
30
31// WithEnv sets the environment variables for the host command
32func WithEnv(env []string) CmdOption {

Callers 2

TestCmdAuthSSHFunction · 0.92

Calls

no outgoing calls

Tested by 2

TestCmdAuthSSHFunction · 0.74