From 30f86bb778667d858f567f336625b3a80b2338f9 Mon Sep 17 00:00:00 2001 From: Megan Marsh Date: Wed, 18 Sep 2019 13:15:49 -0700 Subject: [PATCH] fix ssh and package steps to use source syntax. --- builder/vagrant/step_package.go | 5 ++++- builder/vagrant/step_ssh_config.go | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/builder/vagrant/step_package.go b/builder/vagrant/step_package.go index a6861cd7c..4cb9e2c18 100644 --- a/builder/vagrant/step_package.go +++ b/builder/vagrant/step_package.go @@ -25,10 +25,13 @@ func (s *StepPackage) Run(ctx context.Context, state multistep.StateBag) multist } ui.Say("Packaging box...") packageArgs := []string{} + box := "source" if s.GlobalID != "" { - packageArgs = append(packageArgs, s.GlobalID) + box = s.GlobalID } + packageArgs = append(packageArgs, box) + if len(s.Include) > 0 { packageArgs = append(packageArgs, "--include", strings.Join(s.Include, ",")) } diff --git a/builder/vagrant/step_ssh_config.go b/builder/vagrant/step_ssh_config.go index 7da3cb7d8..d28f10fe4 100644 --- a/builder/vagrant/step_ssh_config.go +++ b/builder/vagrant/step_ssh_config.go @@ -30,7 +30,11 @@ func (s *StepSSHConfig) Run(ctx context.Context, state multistep.StateBag) multi driver := state.Get("driver").(VagrantDriver) config := state.Get("config").(*Config) - sshConfig, err := driver.SSHConfig(s.GlobalID) + box := "source" + if s.GlobalID != "" { + box = s.GlobalID + } + sshConfig, err := driver.SSHConfig(box) if err != nil { state.Put("error", err) return multistep.ActionHalt