builder/azure: replace panics with error returns

pull/4846/head
Matthew Hooker 9 years ago
parent 919ade4ef7
commit 7aca9b7f71
No known key found for this signature in database
GPG Key ID: 7B5F933D9CE8C6A1

@ -248,11 +248,11 @@ func setSshValues(c *Config) error {
if c.Comm.SSHPrivateKey != "" {
privateKeyBytes, err := ioutil.ReadFile(c.Comm.SSHPrivateKey)
if err != nil {
panic(err)
return err
}
signer, err := ssh.ParsePrivateKey(privateKeyBytes)
if err != nil {
panic(err)
return err
}
publicKey := signer.PublicKey()

Loading…
Cancel
Save