From fdea6d02dae5393455683e980c2adec19b4da75c Mon Sep 17 00:00:00 2001 From: Peter Amstutz Date: Mon, 15 Feb 2016 16:58:34 -0500 Subject: [PATCH] 8015: check error when deleting temporary directory. --- services/crunch-run/crunchrun.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/services/crunch-run/crunchrun.go b/services/crunch-run/crunchrun.go index 775b06d78e..1b04bb4424 100644 --- a/services/crunch-run/crunchrun.go +++ b/services/crunch-run/crunchrun.go @@ -429,6 +429,8 @@ func (runner *ContainerRunner) AttachLogs() (err error) { // WaitFinish waits for the container to terminate, capture the exit code, and // close the stdout/stderr logging. func (runner *ContainerRunner) WaitFinish() error { + runner.CrunchLog.Print("Waiting for container to finish") + result := runner.Docker.Wait(runner.ContainerID) wr := <-result if wr.Error != nil { @@ -516,7 +518,9 @@ func (runner *ContainerRunner) CleanupDirs() { for _, tmpdir := range runner.CleanupTempDir { rmerr := os.RemoveAll(tmpdir) - runner.CrunchLog.Printf("While cleaning up temporary directories: %v", rmerr) + if rmerr != nil { + runner.CrunchLog.Printf("While cleaning up temporary directory %s: %v", tmpdir, rmerr) + } } } -- 2.39.5