diff --git a/builder/amazon/common/ssm/session.go b/builder/amazon/common/ssm/session.go index 2c90233e8..350c01ba4 100644 --- a/builder/amazon/common/ssm/session.go +++ b/builder/amazon/common/ssm/session.go @@ -14,7 +14,7 @@ import ( "github.com/aws/aws-sdk-go/service/ssm/ssmiface" "github.com/hashicorp/packer/builder/amazon/common/awserrors" "github.com/hashicorp/packer/common/retry" - "github.com/hashicorp/packer/helper/builder/localexec" + "github.com/hashicorp/packer/common/shell-local/localexec" "github.com/hashicorp/packer/packer" ) diff --git a/builder/docker/exec.go b/builder/docker/exec.go index e04461bb6..ee5a01efd 100644 --- a/builder/docker/exec.go +++ b/builder/docker/exec.go @@ -3,7 +3,7 @@ package docker import ( "os/exec" - "github.com/hashicorp/packer/helper/builder/localexec" + "github.com/hashicorp/packer/common/shell-local/localexec" "github.com/hashicorp/packer/packer" ) diff --git a/helper/builder/localexec/run_and_stream.go b/common/shell-local/localexec/run_and_stream.go similarity index 90% rename from helper/builder/localexec/run_and_stream.go rename to common/shell-local/localexec/run_and_stream.go index f40076cdb..9c598e608 100644 --- a/helper/builder/localexec/run_and_stream.go +++ b/common/shell-local/localexec/run_and_stream.go @@ -14,6 +14,10 @@ import ( "github.com/hashicorp/packer/packer" ) +// RunAndStream allows you to run a local command and stream output to the UI. +// This does not require use of a shell-local communicator, so is a nice tool +// for plugins that need to shell out to a local dependency and provide clear +// output to users. func RunAndStream(cmd *exec.Cmd, ui packer.Ui, sensitive []string) error { stdout_r, stdout_w := io.Pipe() stderr_r, stderr_w := io.Pipe() diff --git a/helper/builder/localexec/run_and_stream_test.go b/common/shell-local/localexec/run_and_stream_test.go similarity index 100% rename from helper/builder/localexec/run_and_stream_test.go rename to common/shell-local/localexec/run_and_stream_test.go diff --git a/common/step_create_cdrom.go b/common/step_create_cdrom.go index 3a350cce9..0f1c5664d 100644 --- a/common/step_create_cdrom.go +++ b/common/step_create_cdrom.go @@ -11,7 +11,7 @@ import ( "runtime" "strings" - "github.com/hashicorp/packer/helper/builder/localexec" + "github.com/hashicorp/packer/common/shell-local/localexec" "github.com/hashicorp/packer/helper/multistep" "github.com/hashicorp/packer/packer" "github.com/hashicorp/packer/packer/tmp"