provisioner/inspec: Fix dropped error

This commit is contained in:
Lars Lehtonen 2019-08-27 17:01:33 -07:00
parent b207752883
commit bd01d0d3c3
1 changed files with 4 additions and 0 deletions

View File

@ -217,6 +217,10 @@ func (p *Provisioner) Provision(ctx context.Context, ui packer.Ui, comm packer.C
} }
hostSigner, err := newSigner(p.config.SSHHostKeyFile) hostSigner, err := newSigner(p.config.SSHHostKeyFile)
if err != nil {
return fmt.Errorf("error creating host signer: %s", err)
}
// Remove the private key file // Remove the private key file
if len(k.privKeyFile) > 0 { if len(k.privKeyFile) > 0 {
defer os.Remove(k.privKeyFile) defer os.Remove(k.privKeyFile)