webi-pwsh: remove old file location to fix existing installations
[webi-installers/.git] / _webi / webi-pwsh.ps1
index 73f30982aaeb299e0de83dff96c2c9b118f8d5ac..8fca7f2839b06bf38e3a0a68354a9ef6ba8e7130 100644 (file)
@@ -31,6 +31,8 @@ New-Item -Path .local\xbin -ItemType Directory -Force
 
 # See note on Set-ExecutionPolicy above
 Set-Content -Path .local\bin\webi.bat -Value "@echo off`r`npushd %USERPROFILE%`r`npowershell -ExecutionPolicy Bypass .local\bin\webi-pwsh.ps1 %1`r`npopd"
+# Backwards-compat bugfix: remove old webi-pwsh.ps1 location
+Remove-Item -Path .local\bin\webi.ps1 -Recurse -ErrorAction Ignore
 if (!(Test-Path -Path .local\opt))
 {
     New-Item -Path .local\opt -ItemType Directory -Force