()
| 46 | } |
| 47 | |
| 48 | func (c *Cmd) AsExec() *exec.Cmd { |
| 49 | //nolint: gosec |
| 50 | execCmd := exec.CommandContext(c.Context, c.Path, c.Args[1:]...) |
| 51 | execCmd.Dir = c.Dir |
| 52 | execCmd.Env = c.Env |
| 53 | return execCmd |
| 54 | } |
| 55 | |
| 56 | // Start the command in a TTY. The calling code must not use cmd after passing it to the PTY, and |
| 57 | // instead rely on the returned Process to manage the command/process. |