From 13ebeee1d31d336676dcb4ea550a3f66bac9d002 Mon Sep 17 00:00:00 2001 From: rob Date: Tue, 16 Jun 2020 21:27:24 -0400 Subject: [PATCH] Error out instead of panicking when passed a bad keyfile --- server/events/vcs/github_credentials.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/events/vcs/github_credentials.go b/server/events/vcs/github_credentials.go index f49aa25e6..b941c6ed1 100644 --- a/server/events/vcs/github_credentials.go +++ b/server/events/vcs/github_credentials.go @@ -105,10 +105,10 @@ func (c *GithubAppCredentials) getInstallationID() (int64, error) { tr := http.DefaultTransport // A non-installation transport t, err := ghinstallation.NewAppsTransportKeyFromFile(tr, c.AppID, c.KeyPath) - t.BaseURL = c.getAPIURL().String() if err != nil { return 0, err } + t.BaseURL = c.getAPIURL().String() // Query github with the app's JWT client := github.NewClient(&http.Client{Transport: t})