Signed-off-by: Ian Babrou <ibobrik@gmail.com>
| ... | ... |
@@ -5,7 +5,6 @@ import ( |
| 5 | 5 |
"encoding/json" |
| 6 | 6 |
"flag" |
| 7 | 7 |
"fmt" |
| 8 |
- "io" |
|
| 9 | 8 |
"io/ioutil" |
| 10 | 9 |
"os" |
| 11 | 10 |
"path/filepath" |
| ... | ... |
@@ -60,11 +59,7 @@ func ApplyLayer(dest string, layer archive.ArchiveReader) (size int64, err error |
| 60 | 60 |
return 0, err |
| 61 | 61 |
} |
| 62 | 62 |
|
| 63 |
- defer func() {
|
|
| 64 |
- if c, ok := decompressed.(io.Closer); ok {
|
|
| 65 |
- c.Close() |
|
| 66 |
- } |
|
| 67 |
- }() |
|
| 63 |
+ defer decompressed.Close() |
|
| 68 | 64 |
|
| 69 | 65 |
cmd := reexec.Command("docker-applyLayer", dest)
|
| 70 | 66 |
cmd.Stdin = decompressed |