From 562265bb295f618123f65af2b9d5877638b2bda7 Mon Sep 17 00:00:00 2001 From: ChristopherHX Date: Wed, 11 May 2022 21:14:45 +0200 Subject: [PATCH] fix: panic while running DRYRUN with local actions (#1141) Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- pkg/container/docker_run.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/container/docker_run.go b/pkg/container/docker_run.go index 1948c31..0bd6711 100644 --- a/pkg/container/docker_run.go +++ b/pkg/container/docker_run.go @@ -162,6 +162,9 @@ func (cr *containerReference) CopyDir(destPath string, srcPath string, useGitIgn } func (cr *containerReference) GetContainerArchive(ctx context.Context, srcPath string) (io.ReadCloser, error) { + if common.Dryrun(ctx) { + return nil, fmt.Errorf("DRYRUN is not supported in GetContainerArchive") + } a, _, err := cr.cli.CopyFromContainer(ctx, cr.id, srcPath) return a, err }