Merge pull request #404 from gabriel-samfira/fix-cli
Avoid nil pointer dereference in CLI
This commit is contained in:
commit
d8cb1c5acd
1 changed files with 4 additions and 1 deletions
|
|
@ -375,7 +375,10 @@ func formatOneGithubCredential(cred params.ForgeCredentials) {
|
|||
header := table.Row{"Field", "Value"}
|
||||
t.AppendHeader(header)
|
||||
|
||||
resetMinutes := cred.RateLimit.ResetIn().Minutes()
|
||||
var resetMinutes float64
|
||||
if cred.RateLimit != nil {
|
||||
resetMinutes = cred.RateLimit.ResetIn().Minutes()
|
||||
}
|
||||
|
||||
t.AppendRow(table.Row{"ID", cred.ID})
|
||||
t.AppendRow(table.Row{"Created At", cred.CreatedAt})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue