fix(deps): update module github.com/containers/image/v5 to v5.31.0

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This commit is contained in:
renovate[bot]
2024-05-21 19:44:54 +00:00
committed by GitHub
parent d244a61155
commit 3ccc89bb4a
185 changed files with 1544 additions and 39494 deletions

View File

@@ -4,12 +4,14 @@
package overlay
import (
"bytes"
"encoding/binary"
"errors"
"fmt"
"os"
"os/exec"
"path/filepath"
"strings"
"sync"
"github.com/containers/storage/pkg/chunked/dump"
@@ -70,12 +72,18 @@ func generateComposeFsBlob(verityDigests map[string]string, toc interface{}, com
// a scope to close outFd before setting fsverity on the read-only fd.
defer outFd.Close()
errBuf := &bytes.Buffer{}
cmd := exec.Command(writerJson, "--from-file", "-", "/proc/self/fd/3")
cmd.ExtraFiles = []*os.File{outFd}
cmd.Stderr = os.Stderr
cmd.Stderr = errBuf
cmd.Stdin = dumpReader
if err := cmd.Run(); err != nil {
return fmt.Errorf("failed to convert json to erofs: %w", err)
rErr := fmt.Errorf("failed to convert json to erofs: %w", err)
exitErr := &exec.ExitError{}
if errors.As(err, &exitErr) {
return fmt.Errorf("%w: %s", rErr, strings.TrimSpace(errBuf.String()))
}
return rErr
}
return nil
}()