diff --git a/builder/amazon/chroot/step_mount_device.go b/builder/amazon/chroot/step_mount_device.go index 0c68986da..70c186264 100644 --- a/builder/amazon/chroot/step_mount_device.go +++ b/builder/amazon/chroot/step_mount_device.go @@ -75,7 +75,7 @@ func (s *StepMountDevice) Cleanup(state map[string]interface{}) { ui.Say("Unmounting the root device...") unmountCommand := fmt.Sprintf("%s %s", config.UnmountCommand, s.mountPath) - cmd := exec.Command("bin/sh", "-c", unmountCommand) + cmd := exec.Command("/bin/sh", "-c", unmountCommand) if err := cmd.Run(); err != nil { ui.Error(fmt.Sprintf( "Error unmounting root device: %s", err)) diff --git a/builder/amazon/chroot/step_mount_extra.go b/builder/amazon/chroot/step_mount_extra.go index 8ce4d3794..be27708d1 100644 --- a/builder/amazon/chroot/step_mount_extra.go +++ b/builder/amazon/chroot/step_mount_extra.go @@ -69,7 +69,7 @@ func (s *StepMountExtra) Cleanup(state map[string]interface{}) { for _, path := range s.mounts { unmountCommand := fmt.Sprintf("%s %s", config.UnmountCommand, path) - cmd := exec.Command("bin/sh", "-c", unmountCommand) + cmd := exec.Command("/bin/sh", "-c", unmountCommand) if err := cmd.Run(); err != nil { ui.Error(fmt.Sprintf( "Error unmounting root device: %s", err))