fix: add nil check

This commit is contained in:
Lewis Russell 2024-07-11 11:04:20 +01:00
parent 375c44bdfd
commit 7178d1a430

View file

@ -88,7 +88,12 @@ end
--- @async
function M:update_abbrev_head()
self.abbrev_head = M.get_info(self.toplevel).abbrev_head
local info = M.get_info(self.toplevel)
if not info then
log.eprintf('Could not get info for repo at %s', self.gitdir)
return
end
self.abbrev_head = info.abbrev_head
end
--- @async