diff --git a/communicator/ssh/communicator.go b/communicator/ssh/communicator.go index a7d0b9a0f..646ffbca4 100644 --- a/communicator/ssh/communicator.go +++ b/communicator/ssh/communicator.go @@ -41,11 +41,11 @@ func (c *comm) Start(cmd string) (remote *packer.RemoteCommand, err error) { // Setup the remote command remote = &packer.RemoteCommand{ - stdin, - stdout, - stderr, - false, - -1, + Stdin: stdin, + Stdout: stdout, + Stderr: stderr, + Exited: false, + ExitStatus: -1, } log.Printf("starting remote command: %s", cmd) diff --git a/packer/rpc/communicator.go b/packer/rpc/communicator.go index b16c94e6f..77e7c4bf5 100644 --- a/packer/rpc/communicator.go +++ b/packer/rpc/communicator.go @@ -80,11 +80,11 @@ func (c *communicator) Start(cmd string) (rc *packer.RemoteCommand, err error) { // Build the response object using the streams we created rc = &packer.RemoteCommand{ - stdinC, - stdoutC, - stderrC, - false, - -1, + Stdin: stdinC, + Stdout: stdoutC, + Stderr: stderrC, + Exited: false, + ExitStatus: -1, } // In a goroutine, we wait for the process to exit, then we set diff --git a/packer/rpc/communicator_test.go b/packer/rpc/communicator_test.go index 5026e0c44..e2edd7c69 100644 --- a/packer/rpc/communicator_test.go +++ b/packer/rpc/communicator_test.go @@ -39,11 +39,11 @@ func (t *testCommunicator) Start(cmd string) (*packer.RemoteCommand, error) { stderr, t.startErr = io.Pipe() rc := &packer.RemoteCommand{ - stdin, - stdout, - stderr, - false, - 0, + Stdin: stdin, + Stdout: stdout, + Stderr: stderr, + Exited: false, + ExitStatus: 0, } t.startExited = &rc.Exited