RunInteractiveCommand runs a command on the host system interactively, with stdin/stdout/stderr connected Returns error
(command string, args []string)
| 81 | // RunInteractiveCommand runs a command on the host system interactively, with stdin/stdout/stderr connected |
| 82 | // Returns error |
| 83 | func 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 |