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

Function DiffCheckActionFunc

scripts/build.go:536–546  ·  view source on GitHub ↗
(ctx context.Context, cmd *cli.Command)

Source from the content-addressed store, hash-verified

534}
535
536func DiffCheckActionFunc(ctx context.Context, cmd *cli.Command) error {
537 if err := os.Chdir(cmd.String("top-dir")); err != nil {
538 return err
539 }
540
541 if err := runCmd(ctx, "git", "diff", "--exit-code"); err != nil {
542 return err
543 }
544
545 return runCmd(ctx, "git", "diff", "--cached", "--exit-code")
546}
547
548func EnsureGoimportsActionFunc(ctx context.Context, cmd *cli.Command) error {
549 topDir := cmd.String("top-dir")

Callers

nothing calls this directly

Calls 2

runCmdFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected