mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-02 11:36:54 -04:00
fix: properly select name in revision archive
This commit is contained in:
parent
d9cc414e69
commit
56083dd56f
1 changed files with 6 additions and 1 deletions
|
|
@ -178,6 +178,11 @@ function M.select_download_commands(repo, project_name, cache_folder, revision,
|
|||
local path_sep = utils.get_path_sep()
|
||||
local url = repo.url:gsub(".git$", "")
|
||||
|
||||
local folder_rev = revision
|
||||
if is_github and revision:match('^v%d') then
|
||||
folder_rev = revision:sub(2)
|
||||
end
|
||||
|
||||
return {
|
||||
M.select_install_rm_cmd(cache_folder, project_name .. "-tmp"),
|
||||
{
|
||||
|
|
@ -213,7 +218,7 @@ function M.select_download_commands(repo, project_name, cache_folder, revision,
|
|||
},
|
||||
M.select_rm_file_cmd(cache_folder .. path_sep .. project_name .. ".tar.gz"),
|
||||
M.select_mv_cmd(
|
||||
utils.join_path(project_name .. "-tmp", url:match "[^/]-$" .. "-" .. revision),
|
||||
utils.join_path(project_name .. "-tmp", url:match "[^/]-$" .. "-" .. folder_rev),
|
||||
project_name,
|
||||
cache_folder
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue