Not doing extra assertion for io.Closer
Signed-off-by: Ian Babrou <ibobrik@gmail.com>
This commit is contained in:
parent
feb02197c1
commit
eec1af54d1
1 changed files with 1 additions and 6 deletions
|
@ -5,7 +5,6 @@ import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
@ -60,11 +59,7 @@ func ApplyLayer(dest string, layer archive.ArchiveReader) (size int64, err error
|
||||||
return 0, err
|
return 0, err
|
||||||
}
|
}
|
||||||
|
|
||||||
defer func() {
|
defer decompressed.Close()
|
||||||
if c, ok := decompressed.(io.Closer); ok {
|
|
||||||
c.Close()
|
|
||||||
}
|
|
||||||
}()
|
|
||||||
|
|
||||||
cmd := reexec.Command("docker-applyLayer", dest)
|
cmd := reexec.Command("docker-applyLayer", dest)
|
||||||
cmd.Stdin = decompressed
|
cmd.Stdin = decompressed
|
||||||
|
|
Loading…
Reference in a new issue