fix: defers after checking for err
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user