mirror of
https://github.com/hashicorp/packer.git
synced 2026-06-11 01:30:06 -04:00
provisioner/shell: tests passing and compiling
This commit is contained in:
parent
716d68bff3
commit
3f1af409e2
1 changed files with 4 additions and 2 deletions
|
|
@ -4,7 +4,6 @@ package shell
|
|||
|
||||
import (
|
||||
"bufio"
|
||||
"bytes"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/mitchellh/packer/common"
|
||||
|
|
@ -231,10 +230,13 @@ func (p *Provisioner) Provision(ui packer.Ui, comm packer.Communicator) error {
|
|||
flattendVars := strings.Join(envVars, " ")
|
||||
|
||||
// Compile the command
|
||||
command := p.config.tpl.Process(p.config.ExecuteCommand, &ExecuteCommandTemplate{
|
||||
command, err := p.config.tpl.Process(p.config.ExecuteCommand, &ExecuteCommandTemplate{
|
||||
Vars: flattendVars,
|
||||
Path: p.config.RemotePath,
|
||||
})
|
||||
if err != nil {
|
||||
return fmt.Errorf("Error processing command: %s", err)
|
||||
}
|
||||
|
||||
cmd := &packer.RemoteCmd{Command: command}
|
||||
log.Printf("Executing command: %s", cmd.Command)
|
||||
|
|
|
|||
Loading…
Reference in a new issue