mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-05 21:24:38 +02:00
Fix nil pointer panic when exec some gitea cli command (#28791)
panic:  After: 
This commit is contained in:
1 parent
5d3fdd1212
commit
c7e4629c02
3 files changed
+9
No files matched your search
@@ -27,5 +27,8 @@ func AuthorizedPublicKeyByContent(ctx context.Context, content string) (string,
|
||||
req := newInternalRequest(ctx, reqURL, "POST")
|
||||
req.Param("content", content)
|
||||
resp, extra := requestJSONResp(req, &responseText{})
|
||||
if resp == nil {
|
||||
return "", extra
|
||||
}
|
||||
return resp.Text, extra
|
||||
}
|
||||
Reference in new issue
Block a user