1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-03-17 21:07:54 +02:00

fix: show git output (#2143)

Co-authored-by: yz <yz@mercedes.com>
This commit is contained in:
ThereWeGo 2022-06-29 21:42:14 +08:00 committed by GitHub
parent 2ad7ffdd7e
commit 4ca25e4679
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -77,10 +77,10 @@ func (r *Repo) Pull(ctx context.Context) error {
cmd = exec.CommandContext(ctx, "git", "pull")
cmd.Dir = r.Path()
out, err := cmd.CombinedOutput()
fmt.Println(string(out))
if err != nil {
return err
}
fmt.Println(string(out))
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())
}
out, err := cmd.CombinedOutput()
fmt.Println(string(out))
if err != nil {
return err
}
fmt.Println(string(out))
return nil
}