From 0802102b2cc9489a06f426b0bd723cff91b65ca3 Mon Sep 17 00:00:00 2001 From: Michael Ramos Date: Tue, 20 Jan 2026 16:01:56 -0800 Subject: [PATCH] fix: clean up old Windows install locations (#101) Users with older installations at ~/.local/bin had PATH conflicts where the old binary took precedence over the new install location. Now removes plannotator from old locations before installing. Co-authored-by: Claude Opus 4.5 --- scripts/install.ps1 | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/scripts/install.ps1 b/scripts/install.ps1 index 70b13d3..90c433b 100644 --- a/scripts/install.ps1 +++ b/scripts/install.ps1 @@ -15,6 +15,19 @@ $arch = if ([Environment]::Is64BitOperatingSystem) { $platform = "win32-$arch" $binaryName = "plannotator-$platform.exe" +# Clean up old install locations that may take precedence in PATH +$oldLocations = @( + "$env:USERPROFILE\.local\bin\plannotator.exe", + "$env:USERPROFILE\.local\bin\plannotator" +) + +foreach ($oldPath in $oldLocations) { + if (Test-Path $oldPath) { + Write-Host "Removing old installation at $oldPath..." + Remove-Item -Force $oldPath -ErrorAction SilentlyContinue + } +} + Write-Host "Fetching latest version..." $release = Invoke-RestMethod -Uri "https://api.github.com/repos/$repo/releases/latest" $latestTag = $release.tag_name -- knotmirror 0.0.1