From 07c0e837ab8e9bec41dcfc59b63b5e80703659a8 Mon Sep 17 00:00:00 2001 From: Rasmus Michelsen Date: Sat, 5 Sep 2020 22:14:40 +0200 Subject: Fixed win32 check hopefully --- lua/nvim-treesitter/install.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lua') diff --git a/lua/nvim-treesitter/install.lua b/lua/nvim-treesitter/install.lua index 58abd6fe5..6740a8147 100644 --- a/lua/nvim-treesitter/install.lua +++ b/lua/nvim-treesitter/install.lua @@ -72,14 +72,14 @@ local function select_args(repo) '-Os', '-lstdc++', } - if not fn.has('win32') then + if fn.has('win32') == 0 then table.insert('-fPIC') end return args end 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 return { cmd = 'cmd', @@ -98,7 +98,7 @@ local function select_install_rm_cmd(cache_folder, project_name) end local function select_mv_cmd(compile_location, parser_lib_name) - if fn.has('win32') then + if fn.has('win32') == 1 then return { cmd = 'cmd', opts = { @@ -119,7 +119,7 @@ local function run_install(cache_folder, package_path, lang, repo, with_sync) parsers.reset_cache() local path_sep = '/' - if fn.has('win32') then + if fn.has('win32') == 1 then path_sep = '\\' end @@ -234,7 +234,7 @@ function M.update(lang) end local function select_uninstall_rm_cmd(lang, parser_lib) - if fn.has('win32') then + if fn.has('win32') == 1 then return { cmd = 'cmd', opts = { @@ -257,7 +257,7 @@ end function M.uninstall(lang) local path_sep = '/' - if fn.has('win32') then + if fn.has('win32') == 1 then path_sep = '\\' end -- cgit v1.2.3-70-g09d2