Do not use builtin tar on Windows

Several parsers (typescript and ocaml specifically) contain symlinks in
their repo. The tar built into Windows cannot handle them.

So, on Windows just use git to download parsers.
This commit is contained in:
AdnoC 2021-01-02 23:37:27 -05:00 committed by Thomas Vigouroux
parent d02caad890
commit add6eaf181

View file

@ -123,8 +123,9 @@ function M.select_download_commands(repo, project_name, cache_folder, revision)
local is_github = repo.url:find("github.com", 1, true)
local is_gitlab = repo.url:find("gitlab.com", 1, true)
local is_windows = fn.hs('win32')
if vim.fn.executable('tar') == 1 and vim.fn.executable('curl') == 1 and (is_github or is_gitlab) then
if vim.fn.executable('tar') == 1 and vim.fn.executable('curl') == 1 and (is_github or is_gitlab) and not is_windows then
revision = revision or repo.branch or "master"
local path_sep = utils.get_path_sep()