1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 10:40:03 +08:00

test(win): fix windows test

This commit is contained in:
wsdjeg 2023-08-09 01:25:27 +08:00
parent 80a3a4051c
commit 893bc9ceb4
2 changed files with 20 additions and 10 deletions

View File

@ -28,11 +28,16 @@ function install_nvim($ver)
{
$url = 'https://github.com/neovim/neovim/releases/download/' + $ver + '/nvim-win64.zip'
}
$Env:VIM_BIN = $Env:DEPS + '\Neovim\bin\nvim.exe'
$zip = $Env:DEPS + '\nvim.zip'
(New-Object Net.WebClient).DownloadFile($url, $zip)
[Reflection.Assembly]::LoadWithPartialName('System.IO.Compression.FileSystem') > $null
[System.IO.Compression.ZipFile]::ExtractToDirectory($zip, $Env:DEPS)
if (Test-Path '$DEPS\Neovim\bin\nvim.exe') {
$Env:VIM_BIN = $Env:DEPS + '\Neovim\bin\nvim.exe'
}else{
$Env:VIM_BIN = $Env:DEPS + '\nvim-win64\bin\nvim.exe'
}
}
function download_lua()

View File

@ -181,8 +181,13 @@ jobs:
run: |
if ($Env:VIM_BIN.StartsWith("nvim"))
{
if (Test-Path '$DEPS\Neovim\bin\nvim.exe') {
$Env:PATH = $Env:DEPS + '\Neovim\bin\;' + $Env:PATH
$Env:VIM = $Env:DEPS + '\Neovim\share\nvim'
}else{
$Env:PATH = $Env:DEPS + '\nvim-win64\bin\;' + $Env:PATH
$Env:VIM = $Env:DEPS + '\nvim-win64\share\nvim'
}
}
elseif ($Env:VIM_BIN.StartsWith("vim"))
{