diff --git a/lua/Trans/core/install.lua b/lua/Trans/core/install.lua index b811ef5..9de9216 100644 --- a/lua/Trans/core/install.lua +++ b/lua/Trans/core/install.lua @@ -22,12 +22,11 @@ return function() local continue = fn.filereadable(zip) == 1 local handle = function(output) if output.exit == 0 and fn.filereadable(zip) then - if fn.executable 'unzip' == 0 then - vim.notify('unzip not found, Please unzip ' .. zip .. 'manually', vim.log.ERROR) - return - end - - local cmd = string.format('unzip %s -d %s', zip, dir) + local cmd = + Trans.system == 'win' and + string.format('powershell.exe -Command "Expand-Archive -Force %s %s"', zip, dir) or + fn.executable('unzip') == 1 and string.format('unzip %s -d %s', zip, dir) or + error('unzip not found, Please unzip ' .. zip .. ' manually') local status = os.execute(cmd) os.remove(zip) if status == 0 then