Skip to content

Commit a4a37dd

Browse files
committed
fix(command): copilot.lua version
1 parent f0b41fb commit a4a37dd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lua/copilot/util.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ local copilot_lua_version = nil
2929
function M.get_copilot_lua_version()
3030
if not copilot_lua_version then
3131
local plugin_version_ok, plugin_version = pcall(function()
32-
return vim.fn.systemlist("git rev-parse HEAD")[1]
32+
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]
3334
end)
3435
copilot_lua_version = plugin_version_ok and plugin_version or "dev"
3536
end

0 commit comments

Comments
 (0)