grim/convey

Add cleanup-list call for tempdir removal.
inject
2017-10-13, Eric Fritz
6da9fbf8f4d4
Parents 2a18f98cc26d
Children 3ac9cbcdf9d3
Add cleanup-list call for tempdir removal.
--- a/docker/environment.go Fri Oct 13 12:08:06 2017 -0500
+++ b/docker/environment.go Fri Oct 13 12:20:50 2017 -0500
@@ -60,7 +60,8 @@
if err != nil {
return err
}
- defer os.RemoveAll(tmpDir)
+
+ defer st.CleanupList.Add(func() { os.RemoveAll(tmpDir) })()
for _, file := range files {
// Export the file into the temp directory and maintain the