From 7aca9b7f7196d1ec6d3d2966ad1e4210000fb778 Mon Sep 17 00:00:00 2001 From: Matthew Hooker Date: Thu, 27 Apr 2017 11:04:57 -0700 Subject: [PATCH] builder/azure: replace panics with error returns --- builder/azure/arm/config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builder/azure/arm/config.go b/builder/azure/arm/config.go index c7348d2ee..1a2485c9e 100644 --- a/builder/azure/arm/config.go +++ b/builder/azure/arm/config.go @@ -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()