diff --git a/cluster/prodaccess/hspki.go b/cluster/prodaccess/hspki.go index 2fcfaf05..04876fb9 100644 --- a/cluster/prodaccess/hspki.go +++ b/cluster/prodaccess/hspki.go @@ -12,6 +12,9 @@ import ( 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) diff --git a/go/pki/locate.go b/go/pki/locate.go index 3b4ca294..e075f55b 100644 --- a/go/pki/locate.go +++ b/go/pki/locate.go @@ -16,7 +16,7 @@ import ( func DeveloperCredentialsLocation() (string, error) { cfgDir, err := os.UserConfigDir() if err != nil { - glog.Exitf("UserConfigDir: %w", err) + return "", fmt.Errorf("UserConfigDir: %w", err) } return fmt.Sprintf("%s/hspki", cfgDir), nil