mirror of
https://git.vectorsigma.ru/public/atlantis.git
synced 2026-07-29 01:58:18 +00:00
Error out instead of panicking when passed a bad keyfile
This commit is contained in:
@@ -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})
|
||||
|
||||
Reference in New Issue
Block a user