Skip to content

Commit

Permalink
fix(find): use full path instead of real path to avoid symlinks (#368)
Browse files Browse the repository at this point in the history
  • Loading branch information
bltavares authored Mar 18, 2024
1 parent a13a960 commit 5f93fb9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lua/neotest/lib/file/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,9 @@ neotest.lib.files.path = {
sep = neotest.lib.files.sep,
exists = neotest.lib.files.exists,
real = function(path)
local err, real = nio.uv.fs_realpath(path)
return real, err
local normalized_path = nio.fn.fnamemodify(path, ":p")
local exists = neotest.lib.files.exists(normalized_path)
return exists and normalized_path or nil, exists
end,
}

Expand Down

0 comments on commit 5f93fb9

Please sign in to comment.