go/pki: fix error return
DeveloperCredentialsLocation used to glog.Exitf instead of returning an
error, and a consumer (prodaccess) used to not check the return code.
Bad refactor?
Change-Id: I6c2d05966ba6b3eb300c24a51584ccf5e324cd49
diff --git a/cluster/prodaccess/hspki.go b/cluster/prodaccess/hspki.go
index 2fcfaf0..04876fb 100644
--- a/cluster/prodaccess/hspki.go
+++ b/cluster/prodaccess/hspki.go
@@ -12,6 +12,9 @@
func useHSPKIKeys(keys *pb.HSPKIKeys) {
path, err := pki.DeveloperCredentialsLocation()
+ if err != nil {
+ glog.Exitf("Could not get location of HSPKI creds: %v", err)
+ }
err = os.MkdirAll(path, 0700)
if err != nil {
glog.Exitf("mkdir %q: %v", path, err)