Commit 3f1af409 authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

provisioner/shell: tests passing and compiling

parent 716d68bf
...@@ -4,7 +4,6 @@ package shell ...@@ -4,7 +4,6 @@ package shell
import ( import (
"bufio" "bufio"
"bytes"
"errors" "errors"
"fmt" "fmt"
"github.com/mitchellh/packer/common" "github.com/mitchellh/packer/common"
...@@ -231,10 +230,13 @@ func (p *Provisioner) Provision(ui packer.Ui, comm packer.Communicator) error { ...@@ -231,10 +230,13 @@ func (p *Provisioner) Provision(ui packer.Ui, comm packer.Communicator) error {
flattendVars := strings.Join(envVars, " ") flattendVars := strings.Join(envVars, " ")
// Compile the command // Compile the command
command := p.config.tpl.Process(p.config.ExecuteCommand, &ExecuteCommandTemplate{ command, err := p.config.tpl.Process(p.config.ExecuteCommand, &ExecuteCommandTemplate{
Vars: flattendVars, Vars: flattendVars,
Path: p.config.RemotePath, Path: p.config.RemotePath,
}) })
if err != nil {
return fmt.Errorf("Error processing command: %s", err)
}
cmd := &packer.RemoteCmd{Command: command} cmd := &packer.RemoteCmd{Command: command}
log.Printf("Executing command: %s", cmd.Command) log.Printf("Executing command: %s", cmd.Command)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment