MCPcopy
hub / github.com/urfave/cli / sh

Function sh

scripts/build.go:167–175  ·  view source on GitHub ↗
(ctx context.Context, exe string, args ...string)

Source from the content-addressed store, hash-verified

165}
166
167func sh(ctx context.Context, exe string, args ...string) (string, error) {
168 cmd := exec.CommandContext(ctx, exe, args...)
169 cmd.Stdin = os.Stdin
170 cmd.Stderr = os.Stderr
171
172 fmt.Fprintf(os.Stderr, "# ---> %s\n", cmd)
173 outBytes, err := cmd.Output()
174 return string(outBytes), err
175}
176
177func topRunAction(arg string, args ...string) cli.ActionFunc {
178 return func(ctx context.Context, cmd *cli.Command) error {

Callers 4

mainFunction · 0.85
GenerateActionFuncFunction · 0.85
EnsureGfmrunActionFuncFunction · 0.85
LintActionFuncFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected