mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-17 19:00:02 -04:00
Fixed win32 check hopefully
This commit is contained in:
parent
d9a7b80c7b
commit
07c0e837ab
1 changed files with 6 additions and 6 deletions
|
|
@ -72,14 +72,14 @@ local function select_args(repo)
|
||||||
'-Os',
|
'-Os',
|
||||||
'-lstdc++',
|
'-lstdc++',
|
||||||
}
|
}
|
||||||
if not fn.has('win32') then
|
if fn.has('win32') == 0 then
|
||||||
table.insert('-fPIC')
|
table.insert('-fPIC')
|
||||||
end
|
end
|
||||||
return args
|
return args
|
||||||
end
|
end
|
||||||
|
|
||||||
local function select_install_rm_cmd(cache_folder, project_name)
|
local function select_install_rm_cmd(cache_folder, project_name)
|
||||||
if fn.has('win32') then
|
if fn.has('win32') == 1 then
|
||||||
local dir = cache_folder ..'\\'.. project_name
|
local dir = cache_folder ..'\\'.. project_name
|
||||||
return {
|
return {
|
||||||
cmd = 'cmd',
|
cmd = 'cmd',
|
||||||
|
|
@ -98,7 +98,7 @@ local function select_install_rm_cmd(cache_folder, project_name)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function select_mv_cmd(compile_location, parser_lib_name)
|
local function select_mv_cmd(compile_location, parser_lib_name)
|
||||||
if fn.has('win32') then
|
if fn.has('win32') == 1 then
|
||||||
return {
|
return {
|
||||||
cmd = 'cmd',
|
cmd = 'cmd',
|
||||||
opts = {
|
opts = {
|
||||||
|
|
@ -119,7 +119,7 @@ local function run_install(cache_folder, package_path, lang, repo, with_sync)
|
||||||
parsers.reset_cache()
|
parsers.reset_cache()
|
||||||
|
|
||||||
local path_sep = '/'
|
local path_sep = '/'
|
||||||
if fn.has('win32') then
|
if fn.has('win32') == 1 then
|
||||||
path_sep = '\\'
|
path_sep = '\\'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -234,7 +234,7 @@ function M.update(lang)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function select_uninstall_rm_cmd(lang, parser_lib)
|
local function select_uninstall_rm_cmd(lang, parser_lib)
|
||||||
if fn.has('win32') then
|
if fn.has('win32') == 1 then
|
||||||
return {
|
return {
|
||||||
cmd = 'cmd',
|
cmd = 'cmd',
|
||||||
opts = {
|
opts = {
|
||||||
|
|
@ -257,7 +257,7 @@ end
|
||||||
|
|
||||||
function M.uninstall(lang)
|
function M.uninstall(lang)
|
||||||
local path_sep = '/'
|
local path_sep = '/'
|
||||||
if fn.has('win32') then
|
if fn.has('win32') == 1 then
|
||||||
path_sep = '\\'
|
path_sep = '\\'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue