NewCmd creates a cmd object configured with the test environment set
(command string, args ...string)
| 287 | |
| 288 | // NewCmd creates a cmd object configured with the test environment set |
| 289 | func (c *CLI) NewCmd(command string, args ...string) icmd.Cmd { |
| 290 | return icmd.Cmd{ |
| 291 | Command: append([]string{command}, args...), |
| 292 | Env: append(c.BaseEnvironment(), c.env...), |
| 293 | } |
| 294 | } |
| 295 | |
| 296 | // NewCmdWithEnv creates a cmd object configured with the test environment set with additional env vars |
| 297 | func (c *CLI) NewCmdWithEnv(envvars []string, command string, args ...string) icmd.Cmd { |