diff --git a/pkg/patch/cmd.go b/pkg/patch/cmd.go index 88989531..1223f98b 100644 --- a/pkg/patch/cmd.go +++ b/pkg/patch/cmd.go @@ -54,8 +54,8 @@ func NewPatchCmd() *cobra.Command { ua.workingFolder, ua.format, ua.output, - ua.ignoreError, bkopts, + ua.ignoreError, ua.push) }, } diff --git a/pkg/patch/patch.go b/pkg/patch/patch.go index 2fbef7eb..64841e39 100644 --- a/pkg/patch/patch.go +++ b/pkg/patch/patch.go @@ -30,13 +30,13 @@ const ( ) // Patch command applies package updates to an OCI image given a vulnerability report. -func Patch(ctx context.Context, timeout time.Duration, buildkitAddr, image, reportFile, patchedTag, workingFolder, format, output string, ignoreError, bkOpts buildkit.Opts, push bool) error { +func Patch(ctx context.Context, timeout time.Duration, image, reportFile, patchedTag, workingFolder, format, output string, bkOpts buildkit.Opts, ignoreError, push bool) error { timeoutCtx, cancel := context.WithTimeout(ctx, timeout) defer cancel() ch := make(chan error) go func() { - ch <- patchWithContext(timeoutCtx, buildkitAddr, image, reportFile, patchedTag, workingFolder, format, output, ignoreError, bkOpts, push) + ch <- patchWithContext(timeoutCtx, image, reportFile, patchedTag, workingFolder, format, output, bkOpts, ignoreError, push) }() select { @@ -61,7 +61,7 @@ func removeIfNotDebug(workingFolder string) { } } -func patchWithContext(ctx context.Context, buildkitAddr, image, reportFile, patchedTag, workingFolder, format, output string, ignoreError, bkOpts buildkit.Opts, push bool) error { +func patchWithContext(ctx context.Context, image, reportFile, patchedTag, workingFolder, format, output string, bkOpts buildkit.Opts, ignoreError, push bool) error { patchedImageName, err := patchedImageTarget(image, patchedTag) if err != nil { return err