Merge pull request #8370 from alrs/fix-builder-lxc-dropped-error

builder/lxc: fix dropped error
This commit is contained in:
Megan Marsh 2019-11-14 15:46:59 -08:00 committed by GitHub
commit 202ba41170
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -53,7 +53,12 @@ func (s *stepExport) Run(ctx context.Context, state multistep.StateBag) multiste
}
_, err = io.Copy(configFile, originalConfigFile)
if err != nil {
err := fmt.Errorf("error copying file %s: %v", config.ConfigFile, err)
state.Put("error", err)
ui.Error(err.Error())
return multistep.ActionHalt
}
commands := make([][]string, 3)
commands[0] = []string{
"lxc-stop", "--name", name,