From 8f9001b5312d522c1b4845623dd24910dbaff53c Mon Sep 17 00:00:00 2001 From: Adrien Delorme Date: Fri, 2 Oct 2020 11:35:20 +0200 Subject: [PATCH] uncopy --- post-processor/shell-local/artifact.go | 34 -------------------- post-processor/shell-local/post-processor.go | 12 ------- 2 files changed, 46 deletions(-) delete mode 100644 post-processor/shell-local/artifact.go diff --git a/post-processor/shell-local/artifact.go b/post-processor/shell-local/artifact.go deleted file mode 100644 index f8dee119a..000000000 --- a/post-processor/shell-local/artifact.go +++ /dev/null @@ -1,34 +0,0 @@ -package shell_local - -type Artifact struct { - builderId string - stringVal string - destroy func() error - files []string - id string - state func(name string) interface{} -} - -func (a *Artifact) BuilderId() string { - return a.builderId -} - -func (a *Artifact) Files() []string { - return a.files -} - -func (a *Artifact) Id() string { - return a.id -} - -func (a *Artifact) String() string { - return a.stringVal -} - -func (a *Artifact) State(name string) interface{} { - return a.state(name) -} - -func (a *Artifact) Destroy() error { - return a.destroy() -} diff --git a/post-processor/shell-local/post-processor.go b/post-processor/shell-local/post-processor.go index 78984bd55..a17ce67e3 100644 --- a/post-processor/shell-local/post-processor.go +++ b/post-processor/shell-local/post-processor.go @@ -54,18 +54,6 @@ func (p *PostProcessor) PostProcess(ctx context.Context, ui packer.Ui, artifact return nil, false, false, retErr } - // Return a "copy" of the artifact to keep the previous artifact data - // If we don't this, the data will be lost in packer/rpc/post_processor.go - // when a new artifact is created from the client. - artifact = &Artifact{ - builderId: artifact.BuilderId(), - stringVal: artifact.String(), - destroy: artifact.Destroy, - files: artifact.Files(), - id: artifact.Id(), - state: artifact.State, - } - // Force shell-local pp to keep the input artifact, because otherwise we'll // lose it instead of being able to pass it through. If you want to delete // the input artifact for a shell local pp, use the artifice pp to create a