webi-pwsh: remove old file location to fix existing installations
authorAJ ONeal <aj@therootcompany.com>
Mon, 29 Mar 2021 06:14:21 +0000 (06:14 +0000)
committerAJ ONeal <aj@therootcompany.com>
Mon, 29 Mar 2021 06:14:21 +0000 (06:14 +0000)
_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