mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-13 01:50:55 +00:00
fix: re-add log outputs
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
package git
|
||||
|
||||
import (
|
||||
"log"
|
||||
"os/exec"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
@@ -35,8 +36,9 @@ func ClonerUsingGitExec(repoSpec *RepoSpec) error {
|
||||
"--depth=1",
|
||||
repoSpec.CloneSpec(),
|
||||
repoSpec.Dir.String())
|
||||
_, err = cmd.CombinedOutput()
|
||||
out, err = cmd.CombinedOutput()
|
||||
if err != nil {
|
||||
log.Printf("Error cloning git repo: %s", out)
|
||||
return errors.Wrapf(
|
||||
err,
|
||||
"trouble cloning git repo %v in %s",
|
||||
@@ -50,8 +52,9 @@ func ClonerUsingGitExec(repoSpec *RepoSpec) error {
|
||||
"origin",
|
||||
repoSpec.Ref)
|
||||
cmd.Dir = repoSpec.Dir.String()
|
||||
_, err = cmd.CombinedOutput()
|
||||
out, err = cmd.CombinedOutput()
|
||||
if err != nil {
|
||||
log.Printf("Error fetching ref: %s", out)
|
||||
return errors.Wrapf(err, "trouble fetching %s", repoSpec.Ref)
|
||||
}
|
||||
|
||||
@@ -60,8 +63,9 @@ func ClonerUsingGitExec(repoSpec *RepoSpec) error {
|
||||
"checkout",
|
||||
repoSpec.Ref)
|
||||
cmd.Dir = repoSpec.Dir.String()
|
||||
_, err = cmd.CombinedOutput()
|
||||
out, err = cmd.CombinedOutput()
|
||||
if err != nil {
|
||||
log.Printf("Error checking out ref: %s", out)
|
||||
return errors.Wrapf(err, "trouble checking out %s", repoSpec.Ref)
|
||||
}
|
||||
|
||||
@@ -72,8 +76,9 @@ func ClonerUsingGitExec(repoSpec *RepoSpec) error {
|
||||
"--init",
|
||||
"--recursive")
|
||||
cmd.Dir = repoSpec.Dir.String()
|
||||
_, err = cmd.CombinedOutput()
|
||||
out, err = cmd.CombinedOutput()
|
||||
if err != nil {
|
||||
log.Printf("Error fetching submodules: %s", out)
|
||||
return errors.Wrapf(err, "trouble fetching submodules for %s", repoSpec.CloneSpec())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user