using push/pop location instead to accommodate for powershell v5

This commit is contained in:
Baipyrus 2024-11-24 22:55:12 +01:00
parent 8c6dcd4590
commit eaf1e8e9f3
2 changed files with 5 additions and 2 deletions

View File

@ -94,6 +94,7 @@ function ProcessUrlFiles
if (-not (Test-Path $tmpApp))
{ New-Item -ItemType Directory -Path $tmpApp | Out-Null
}
Push-Location
Set-Location $tmpApp
# Find all .url files in the source directory
@ -150,7 +151,7 @@ function ProcessUrlFiles
Write-Host "Cloning $fileName from $url to $destinationPath..." -ForegroundColor Cyan
git clone $url $destinationPath
}
Set-Location -
Pop-Location
}
# Function to expand zip archives and copy to destination paths

View File

@ -45,8 +45,10 @@ function InstallWSLNeovim
Import-Module ./windows.psm1
ProcessUrlFiles -sourceDir $source
Push-Location
Set-Location "$env:TMP\nvim-config"
Write-Host "Copying (forcably) configuration to WSL..." -ForegroundColor Yellow
wsl.exe cp -rf . ~/.config/ 2>$null | Out-Null
Set-Location -
Pop-Location
}