Skip to content

Commit 08c2de7

Browse files
leodidoona-agent
andcommitted
fix: update getDeterministicMtime to use context parameter
Update call to getGitCommitTimestamp() to pass context.Background() after the function signature was updated to support cancellation. Co-authored-by: Ona <no-reply@ona.com>
1 parent acd2771 commit 08c2de7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/leeway/build.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2402,7 +2402,7 @@ func createDockerExportMetadata(wd, version string, cfg DockerPkgConfig) error {
24022402
// getDeterministicMtime returns the Unix timestamp to use for tar --mtime flag.
24032403
// It uses the same timestamp source as SBOM normalization for consistency.
24042404
func (p *Package) getDeterministicMtime() (int64, error) {
2405-
timestamp, err := getGitCommitTimestamp(p.C.Git().Commit)
2405+
timestamp, err := getGitCommitTimestamp(context.Background(), p.C.Git().Commit)
24062406
if err != nil {
24072407
return 0, fmt.Errorf("failed to get deterministic timestamp for tar mtime (commit: %s): %w. "+
24082408
"Ensure git is available and the repository is not a shallow clone, or set SOURCE_DATE_EPOCH environment variable",

0 commit comments

Comments
 (0)