bootdeploy: catch any errors when closing kernel file copy fd

This commit is contained in:
Clayton Craft
2023-03-05 22:55:37 -08:00
parent 8b67848d5c
commit fa3d3268d7

View File

@@ -76,7 +76,9 @@ func bootDeploy(workDir string, outDir string) error {
if _, err = io.Copy(kernFileCopy, kernFd); err != nil {
return err
}
kernFileCopy.Close()
if err := kernFileCopy.Close(); err != nil {
return err
}
// boot-deploy -i initramfs -k vmlinuz-postmarketos-rockchip -d /tmp/cpio -o /tmp/foo initramfs-extra
cmd := exec.Command("boot-deploy",