MCPcopy
hub / github.com/docker/compose / NewCmd

Method NewCmd

pkg/e2e/framework.go:289–294  ·  view source on GitHub ↗

NewCmd creates a cmd object configured with the test environment set

(command string, args ...string)

Source from the content-addressed store, hash-verified

287
288// NewCmd creates a cmd object configured with the test environment set
289func (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
297func (c *CLI) NewCmdWithEnv(envvars []string, command string, args ...string) icmd.Cmd {

Callers 5

NewDockerCmdMethod · 0.95
RunCmdMethod · 0.95
RunCmdInDirMethod · 0.95
NewDockerComposeCmdMethod · 0.95
TestLocalComposeRunFunction · 0.80

Calls 1

BaseEnvironmentMethod · 0.95

Tested by 1

TestLocalComposeRunFunction · 0.64