gotestyourself / gotestyourself/gotest.tools
Expose `buildCmd`
Open
enhancement
help wanted
- Dominant language
- Go
- Stars
- 576
- Forks
- 54
- Avg merge
- 6d 3h
- Merged PRs (30d)
- 2
Description
I don't know how much spread is this need. In my specific case, I need to access the underlying `exec.Cmd` that is built in `buildCmd` without starting it. Currently, all the exposed functions that return `icmd.Result` already started the underlying `exec.Cmd`.
In case you wonder why I need to do this, here's some context. I need to test an interactive REPL, so I'm using [this](https://github.com/kr/pty). The entrypoint of `pty` is this function:
```
func Start(c *exec.Cmd) (pty *os.File, err error)
```
so I'd like to do something like:
```
r := icmd.BuildCmd(cmd)
in, err := pty.Start(r.Cmd)
```
Contributor guide
Assessment
This issue has not been assessed yet.