MCPcopy
hub / github.com/github/git-sizer / Command

Function Command

internal/pipe/command.go:35–42  ·  view source on GitHub ↗

Command returns a pipeline `Stage` based on the specified external `command`, run with the given command-line `args`. Its stdin and stdout are handled as usual, and its stderr is collected and included in any `*exec.ExitError` that the command might emit.

(command string, args ...string)

Source from the content-addressed store, hash-verified

33// stdout are handled as usual, and its stderr is collected and
34// included in any `*exec.ExitError` that the command might emit.
35func Command(command string, args ...string) Stage {
36 if len(command) == 0 {
37 panic("attempt to create command with empty command")
38 }
39
40 cmd := exec.Command(command, args...)
41 return CommandStage(command, cmd)
42}
43
44// Command returns a pipeline `Stage` with the name `name`, based on
45// the specified `cmd`. Its stdin and stdout are handled as usual, and

Callers 15

TestNontrivialPipelineFunction · 0.92
TestPipelineDirFunction · 0.92
TestPipelineExitFunction · 0.92
TestPipelineStderrFunction · 0.92
TestPipelineInterruptedFunction · 0.92
TestPipelineCanceledFunction · 0.92
TestLittleEPIPEFunction · 0.92

Calls 1

CommandStageFunction · 0.85

Tested by 15

TestNontrivialPipelineFunction · 0.74
TestPipelineDirFunction · 0.74
TestPipelineExitFunction · 0.74
TestPipelineStderrFunction · 0.74
TestPipelineInterruptedFunction · 0.74
TestPipelineCanceledFunction · 0.74
TestLittleEPIPEFunction · 0.74