post-processor/shell-local: Fix output of debug info to stdout

This commit is contained in:
DanHam 2017-01-23 22:08:23 +00:00
parent 28051a9218
commit 5a350f5699
No known key found for this signature in database
GPG Key ID: 58E79AEDD6AA987E
1 changed files with 3 additions and 4 deletions

View File

@ -5,6 +5,7 @@ import (
"errors"
"fmt"
"io/ioutil"
"log"
"os"
"strings"
@ -185,15 +186,13 @@ func (p *PostProcessor) PostProcess(ui packer.Ui, artifact packer.Artifact) (pac
return nil, false, fmt.Errorf("Error processing command: %s", err)
}
ui.Say(fmt.Sprintf("Post processing with local shell script: %s", command))
ui.Say(fmt.Sprintf("Post processing with local shell script: %s", script))
comm := &Communicator{}
cmd := &packer.RemoteCmd{Command: command}
ui.Say(fmt.Sprintf(
"Executing local script: %s",
script))
log.Printf("starting local command: %s", command)
if err := cmd.StartWithUi(comm, ui); err != nil {
return nil, false, fmt.Errorf(
"Error executing script: %s\n\n"+