review comments

This commit is contained in:
Megan Marsh 2019-02-05 15:16:47 -08:00
parent e8c655bf15
commit 608b7cb7a3
1 changed files with 2 additions and 3 deletions

View File

@ -36,10 +36,9 @@ type VagrantfileOptions struct {
BoxName string
}
func (s *StepInitializeVagrant) createInitializeCommand() (string, error) {
func (s *StepInitializeVagrant) getVagrantfileTemplate() (string, error) {
tplPath := filepath.Join(s.OutputDir, "packer-vagrantfile-template.erb")
templateFile, err := os.Create(tplPath)
templateFile.Chmod(0777)
if err != nil {
retErr := fmt.Errorf("Error creating vagrantfile %s", err.Error())
return "", retErr
@ -93,7 +92,7 @@ func (s *StepInitializeVagrant) prepInitArgs() ([]string, error) {
initArgs = append(initArgs, "-m")
}
tplPath, err := s.createInitializeCommand()
tplPath, err := s.getVagrantfileTemplate()
if err != nil {
return initArgs, err
}