Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

env_*: log command output #69

Merged
merged 1 commit into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion env_docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,8 @@ func (e *DockerEnvironment) close() {
}

if e.dir != "" {
if err := e.exec("chmod", "-R", "777", e.dir).Run(); err != nil {
if out, err := e.exec("chmod", "-R", "777", e.dir).CombinedOutput(); err != nil {
e.logger.Log(string(out))
e.logger.Log("Error while chmod sharedDir", e.dir, "err:", err)
}
if err := os.RemoveAll(e.dir); err != nil {
Expand Down
8 changes: 2 additions & 6 deletions env_kind.go
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,8 @@ func (e *KindEnvironment) close() {
}

if e.dir != "" {
if err := e.exec("chmod", "-R", "777", e.dir).Run(); err != nil {
if out, err := e.exec("chmod", "-R", "777", e.dir).CombinedOutput(); err != nil {
e.logger.Log(string(out))
e.logger.Log("Error while chmod sharedDir", e.dir, "err:", err)
}
if err := os.RemoveAll(e.dir); err != nil {
Expand Down Expand Up @@ -779,11 +780,6 @@ func (r *kindRunnable) prePullImage(ctx context.Context) (err error) {
return errors.Wrapf(err, "docker image %q failed to download", r.opts.Image)
}

if err := r.env.execContext(ctx, "docker", "image", "inspect", r.opts.Image).Run(); err == nil {
return errors.Wrapf(err, "load image %q into cluster", r.opts.Image)

}

return nil
}

Expand Down