We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f0b41fb commit a4a37ddCopy full SHA for a4a37dd
1 file changed
lua/copilot/util.lua
@@ -29,7 +29,8 @@ local copilot_lua_version = nil
29
function M.get_copilot_lua_version()
30
if not copilot_lua_version then
31
local plugin_version_ok, plugin_version = pcall(function()
32
- return vim.fn.systemlist("git rev-parse HEAD")[1]
+ local plugin_dir = vim.fn.fnamemodify(M.get_copilot_path(), ":h:h")
33
+ return vim.fn.systemlist(string.format("cd %s && git rev-parse HEAD", plugin_dir))[1]
34
end)
35
copilot_lua_version = plugin_version_ok and plugin_version or "dev"
36
end
0 commit comments