Fix content.ReaderAt close

Signed-off-by: Shiming Zhang <wzshiming@foxmail.com>
This commit is contained in:
Shiming Zhang
2021-05-08 12:30:16 +08:00
parent 01ca105b6a
commit b890f056e8
4 changed files with 8 additions and 1 deletions

View File

@@ -164,6 +164,7 @@ var diffCommand = cli.Command{
if err != nil {
return err
}
defer ra.Close()
_, err = io.Copy(os.Stdout, content.NewReader(ra))
return err