Skip to content

Commit

Permalink
fix: fallback to github.com when host returns nil
Browse files Browse the repository at this point in the history
- Seems to be caused by the Octo filetype
- See #53
  • Loading branch information
GitMurf authored and petertriho committed Dec 29, 2023
1 parent f900a4c commit 1a101a8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lua/cmp_git/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ M.get_git_info = function(remotes, opts)
git_info = get_git_info()
end

if (git_info.host or "") == "" then
-- fallback to github.com
git_info.host = "github.com"
end

return git_info
end

Expand Down

0 comments on commit 1a101a8

Please sign in to comment.