mirror of
https://github.com/hexedtech/codemp-nvim.git
synced 2024-11-22 15:34:53 +01:00
fix: copy on windows
This commit is contained in:
parent
5ec9f8050e
commit
2b869bb7ab
1 changed files with 19 additions and 8 deletions
15
build.lua
15
build.lua
|
@ -51,6 +51,17 @@ if os_uname.sysname == "Windows_NT" then
|
|||
})
|
||||
|
||||
print("downloading in background... library will be installed upon restart")
|
||||
|
||||
vim.api.nvim_create_autocmd(
|
||||
{"ExitPre"},
|
||||
{
|
||||
callback = function (_ev)
|
||||
local handle, pid = vim.uv.spawn("cmd.exe", {
|
||||
args = { "move", "/Y", native_path, replace_native_path }
|
||||
})
|
||||
end
|
||||
}
|
||||
)
|
||||
else
|
||||
local res = vim.system({"curl", "-o", native_path, download_url_native }):wait() -- TODO can we run this asynchronously?
|
||||
print(res.stdout)
|
||||
|
@ -63,8 +74,6 @@ else
|
|||
print(res.stdout)
|
||||
print(res.stderr)
|
||||
end
|
||||
end
|
||||
|
||||
vim.api.nvim_create_autocmd(
|
||||
{"ExitPre"},
|
||||
{
|
||||
|
@ -73,3 +82,5 @@ vim.api.nvim_create_autocmd(
|
|||
end
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue