MCPcopy Create free account
hub / github.com/cli/cli / Run

Method Run

internal/run/stub.go:123–133  ·  view source on GitHub ↗

Run satisfies Runnable

()

Source from the content-addressed store, hash-verified

121
122// Run satisfies Runnable
123func (s *commandStub) Run() error {
124 if s.exitStatus != 0 {
125 // It's nontrivial to construct a fake `exec.ExitError` instance, so we return an error type
126 // that has the `ExitCode() int` method.
127 return errWithExitCode{
128 message: fmt.Sprintf("%s exited with status %d", s.pattern, s.exitStatus),
129 exitCode: s.exitStatus,
130 }
131 }
132 return nil
133}
134
135// Output satisfies Runnable
136func (s *commandStub) Output() ([]byte, error) {

Callers 1

OutputMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected