post-processor/shell-local: Fix output of debug info to stdout
This commit is contained in:
parent
28051a9218
commit
5a350f5699
|
@ -5,6 +5,7 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
|
"log"
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"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)
|
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{}
|
comm := &Communicator{}
|
||||||
|
|
||||||
cmd := &packer.RemoteCmd{Command: command}
|
cmd := &packer.RemoteCmd{Command: command}
|
||||||
|
|
||||||
ui.Say(fmt.Sprintf(
|
log.Printf("starting local command: %s", command)
|
||||||
"Executing local script: %s",
|
|
||||||
script))
|
|
||||||
if err := cmd.StartWithUi(comm, ui); err != nil {
|
if err := cmd.StartWithUi(comm, ui); err != nil {
|
||||||
return nil, false, fmt.Errorf(
|
return nil, false, fmt.Errorf(
|
||||||
"Error executing script: %s\n\n"+
|
"Error executing script: %s\n\n"+
|
||||||
|
|
Loading…
Reference in New Issue