Merge pull request #8045 from alrs/fix-provisioner-dropped-errors
Fix provisioner dropped errors
This commit is contained in:
commit
4b1c766c76
|
@ -240,6 +240,10 @@ func (p *Provisioner) Provision(ctx context.Context, ui packer.Ui, comm packer.C
|
|||
}
|
||||
|
||||
hostSigner, err := newSigner(p.config.SSHHostKeyFile)
|
||||
if err != nil {
|
||||
return fmt.Errorf("error creating host signer: %s", err)
|
||||
}
|
||||
|
||||
// Remove the private key file
|
||||
if len(k.privKeyFile) > 0 {
|
||||
defer os.Remove(k.privKeyFile)
|
||||
|
|
|
@ -217,6 +217,10 @@ func (p *Provisioner) Provision(ctx context.Context, ui packer.Ui, comm packer.C
|
|||
}
|
||||
|
||||
hostSigner, err := newSigner(p.config.SSHHostKeyFile)
|
||||
if err != nil {
|
||||
return fmt.Errorf("error creating host signer: %s", err)
|
||||
}
|
||||
|
||||
// Remove the private key file
|
||||
if len(k.privKeyFile) > 0 {
|
||||
defer os.Remove(k.privKeyFile)
|
||||
|
|
Loading…
Reference in New Issue