fix: defers after checking for err
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2021-08-31 16:47:38 +01:00
parent 542e9eea5c
commit 7835c1f91d
2 changed files with 9 additions and 1 deletions

View File

@ -111,10 +111,10 @@ var appCpCommand = &cli.Command{
}
} else {
content, _, err := cl.CopyFromContainer(ctx, container.ID, srcPath)
defer content.Close()
if err != nil {
logrus.Fatal(err)
}
defer content.Close()
fromTarOpts := &archive.TarOptions{NoOverwriteDirNonDir: true, Compression: archive.Gzip}
if err := archive.Untar(content, dstPath, fromTarOpts); err != nil {
logrus.Fatal(err)