if wsl detected, save neovim in $tmp, copy to config home

This commit is contained in:
Baipyrus 2024-10-21 21:08:05 +02:00
parent c90d46ef6c
commit 1e01a70182

View File

@ -158,6 +158,12 @@ Write-Host "Setting up Neovim configuration..." -ForegroundColor Cyan
$ubuntu = wsl.exe -l --all | Where-Object { $_.Replace("`0", "") -match '^Ubuntu' }
if ($null -eq $ubuntu)
{ ProcessUrlFiles -sourceDir "$dotfilesRepo\nvim" -destinationDir "$env:LOCALAPPDATA"
} else
{
ProcessUrlFiles -sourceDir "$dotfilesRepo\nvim"
Set-Location "$env:TMP\nvim-config"
wsl.exe cp -rf . ~/.config/ 2>$null | Out-Null
Set-Location -
}
# Setting up PowerShell Profile