MCPcopy Index your code
hub / github.com/ddev/ddev / RunInteractiveCommand

Function RunInteractiveCommand

pkg/exec/exec.go:83–94  ·  view source on GitHub ↗

RunInteractiveCommand runs a command on the host system interactively, with stdin/stdout/stderr connected Returns error

(command string, args []string)

Source from the content-addressed store, hash-verified

81// RunInteractiveCommand runs a command on the host system interactively, with stdin/stdout/stderr connected
82// Returns error
83func RunInteractiveCommand(command string, args []string) error {
84 cmd := HostCommand(command, args...)
85 cmd.Stdin = os.Stdin
86 cmd.Stdout = os.Stdout
87 cmd.Stderr = os.Stderr
88 err := cmd.Start()
89 if err != nil {
90 return err
91 }
92 err = cmd.Wait()
93 return err
94}
95
96// RunInteractiveCommandWithOutput writes to the host and
97// also to the passed io.Writer

Callers 4

TestSSHAuthFunction · 0.92
ExecuteMethod · 0.92
ExecOnHostOrServiceMethod · 0.92
makeHostCmdFunction · 0.92

Calls 3

HostCommandFunction · 0.85
StartMethod · 0.80
WaitMethod · 0.80

Tested by 1

TestSSHAuthFunction · 0.74