fix: show git output (#2143)

Co-authored-by: yz <yz@mercedes.com>
pull/2145/head
ThereWeGo 2 years ago committed by GitHub
parent 2ad7ffdd7e
commit 4ca25e4679
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      cmd/kratos/internal/base/repo.go

@ -77,10 +77,10 @@ func (r *Repo) Pull(ctx context.Context) error {
cmd = exec.CommandContext(ctx, "git", "pull") cmd = exec.CommandContext(ctx, "git", "pull")
cmd.Dir = r.Path() cmd.Dir = r.Path()
out, err := cmd.CombinedOutput() out, err := cmd.CombinedOutput()
fmt.Println(string(out))
if err != nil { if err != nil {
return err return err
} }
fmt.Println(string(out))
return err return err
} }
@ -96,10 +96,10 @@ func (r *Repo) Clone(ctx context.Context) error {
cmd = exec.CommandContext(ctx, "git", "clone", "-b", r.branch, r.url, r.Path()) cmd = exec.CommandContext(ctx, "git", "clone", "-b", r.branch, r.url, r.Path())
} }
out, err := cmd.CombinedOutput() out, err := cmd.CombinedOutput()
fmt.Println(string(out))
if err != nil { if err != nil {
return err return err
} }
fmt.Println(string(out))
return nil return nil
} }

Loading…
Cancel
Save