Skip to content

Commit cc78c41

Browse files
committed
fix(compiler): use absolute gitpath in cache hash
Related projekt0n#262
1 parent 796ecdd commit cc78c41

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lua/github-theme/init.lua

+3-2
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,9 @@ M.setup = function(opts)
9494
local cached_path = util.join_paths(config.options.compile_path, 'cache')
9595
local cached = read_file(cached_path)
9696

97-
local git_path = util.join_paths(debug.getinfo(1).source:sub(2, -27), '.git')
98-
local git = vim.fn.getftime(git_path)
97+
local git_path =
98+
vim.fn.fnamemodify(vim.fn.resolve(debug.getinfo(1).source:sub(2)), ':p:h:h:h')
99+
local git = vim.fn.getftime(util.join_paths(git_path, '.git'))
99100
local hash = require('github-theme.lib.hash')(opts) .. (git == -1 and git_path or git)
100101

101102
if cached ~= hash then

0 commit comments

Comments
 (0)