Skip to content

Commit f9bf72f

Browse files
committed
fix: incorrectly committed state of download functions
1 parent 4931ee9 commit f9bf72f

File tree

1 file changed

+28
-30
lines changed

1 file changed

+28
-30
lines changed

lua/copilot/lsp_binary.lua

Lines changed: 28 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -43,42 +43,40 @@ end
4343
---@param local_server_zip_filepath string
4444
---@return boolean
4545
local function download_file_with_wget(url, local_server_zip_filepath)
46-
return false
47-
-- if vim.fn.executable("wget") == 0 then
48-
-- return false
49-
-- end
50-
--
51-
-- local wget_cmd = string.format('wget -O "%s" "%s"', local_server_zip_filepath:gsub("\\", "\\\\"), url)
52-
-- logger.trace("Downloading copilot-language-server with command: " .. wget_cmd)
53-
-- local result = vim.fn.system(wget_cmd)
54-
--
55-
-- if vim.v.shell_error ~= 0 then
56-
-- logger.error("error downloading file with wget: " .. result)
57-
-- return false
58-
-- end
59-
--
60-
-- return true
46+
if vim.fn.executable("wget") == 0 then
47+
return false
48+
end
49+
50+
local wget_cmd = string.format('wget -O "%s" "%s"', local_server_zip_filepath:gsub("\\", "\\\\"), url)
51+
logger.trace("Downloading copilot-language-server with command: " .. wget_cmd)
52+
local result = vim.fn.system(wget_cmd)
53+
54+
if vim.v.shell_error ~= 0 then
55+
logger.error("error downloading file with wget: " .. result)
56+
return false
57+
end
58+
59+
return true
6160
end
6261

6362
---@param url string
6463
---@param local_server_zip_filepath string
6564
---@return boolean
6665
local function download_file_with_curl(url, local_server_zip_filepath)
67-
return false
68-
-- if vim.fn.executable("curl") == 0 then
69-
-- return false
70-
-- end
71-
--
72-
-- local cmd = string.format('curl -s -L -o "%s" "%s"', local_server_zip_filepath:gsub("\\", "\\\\"), url)
73-
-- logger.trace("downloading copilot-language-server with command: " .. cmd)
74-
-- local result = vim.fn.system(cmd)
75-
--
76-
-- if vim.v.shell_error ~= 0 then
77-
-- logger.error("error downloading file: " .. result)
78-
-- return false
79-
-- end
80-
--
81-
-- return true
66+
if vim.fn.executable("curl") == 0 then
67+
return false
68+
end
69+
70+
local cmd = string.format('curl -s -L -o "%s" "%s"', local_server_zip_filepath:gsub("\\", "\\\\"), url)
71+
logger.trace("downloading copilot-language-server with command: " .. cmd)
72+
local result = vim.fn.system(cmd)
73+
74+
if vim.v.shell_error ~= 0 then
75+
logger.error("error downloading file: " .. result)
76+
return false
77+
end
78+
79+
return true
8280
end
8381

8482
---@param url string

0 commit comments

Comments
 (0)