builder/amazon/chroot: quote commands and pass through a shell [GH-581]

This commit is contained in:
Mitchell Hashimoto 2013-11-08 10:22:56 -08:00
parent 02984bdb82
commit 17f1ee3e98
2 changed files with 2 additions and 1 deletions

View File

@ -14,6 +14,7 @@ IMPROVEMENTS:
BUG FIXES:
* builder/amazon/chroot: Chroot commands work with shell provisioners. [GH-581]
* builder/vmware: VMX modifications are now case-insensitive. [GH-608]
## 0.3.11 (November 4, 2013)

View File

@ -21,7 +21,7 @@ type Communicator struct {
func (c *Communicator) Start(cmd *packer.RemoteCmd) error {
command, err := c.CmdWrapper(
fmt.Sprintf("chroot %s %s", c.Chroot, cmd.Command))
fmt.Sprintf("chroot %s /bin/sh -c \"%s\"", c.Chroot, cmd.Command))
if err != nil {
return err
}