Skip to content

Commit

Permalink
Merge pull request #291 from tmillr/fix-compiler-abs-gitpath
Browse files Browse the repository at this point in the history
fix(compiler): use absolute gitpath in cache hash
  • Loading branch information
ful1e5 committed Aug 2, 2023
2 parents 796ecdd + cc78c41 commit 832d783
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lua/github-theme/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,9 @@ M.setup = function(opts)
local cached_path = util.join_paths(config.options.compile_path, 'cache')
local cached = read_file(cached_path)

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

if cached ~= hash then
Expand Down

0 comments on commit 832d783

Please sign in to comment.