marcosnils / bin

Effortless binary manager
MIT License
640 stars 44 forks source link

bin unable to update itself in Powershell #193

Open smajl87 opened 3 months ago

smajl87 commented 3 months ago

Issue: bin.exe is not able to update itself.

OS: Microsoft Windows 11 Pro (10.0.22631 N/A Build 22631) Shell: Powershell 5.1.22621.2506 & Powershell 7.4.1

PS C:\Users\admin\bin> bin update bin.exe --debug
   • debug logs enabled, version: 0.17.3
commit: 9da887da9ce476a54e25828bad962a1cae2da17c
built at: 2024-01-31T03:39:37Z
built by: goreleaser

   • Config directory is: C:\Users\admin\.bin
   • Download path set to C:\Users\admin\bin
   • Checking updates for C:\Users\admin\bin\bin.exe
   • Getting latest release for marcosnils/bin
   • Found new version v0.17.4 for C:\Users\admin\bin\bin.exe at https://github.com/marcosnils/bin/releases/tag/v0.17.4
   • C:\Users\admin\bin\bin.exe v0.17.3 -> v0.17.4 (https://github.com/marcosnils/bin/releases/tag/v0.17.4)

Do you want to continue? [Y/n] y
   • Getting v0.17.4 release for marcosnils/bin
   • Removing bin_0.17.4_windows_arm64.exe (URL https://api.github.com/repos/marcosnils/bin/releases/assets/155860489) with score 41 lower than 46
   • Keeping bin_0.17.4_windows_amd64.exe (URL https://api.github.com/repos/marcosnils/bin/releases/assets/155860491) with highest score 46
   • Removing bin_0.17.4_windows_386.exe (URL https://api.github.com/repos/marcosnils/bin/releases/assets/155860486) with score 36 lower than 46
   • Removing bin_0.17.4_linux_arm64 (URL https://api.github.com/repos/marcosnils/bin/releases/assets/155860487) with score 6 lower than 46
   • Removing bin_0.17.4_linux_amd64 (URL https://api.github.com/repos/marcosnils/bin/releases/assets/155860488) with score 11 lower than 46
   • Removing bin_0.17.4_linux_386 (URL https://api.github.com/repos/marcosnils/bin/releases/assets/155860485) with score 1 lower than 46
   • Removing bin_0.17.4_darwin_arm64 (URL https://api.github.com/repos/marcosnils/bin/releases/assets/155860493) with score 16 lower than 46
   • Removing bin_0.17.4_darwin_amd64 (URL https://api.github.com/repos/marcosnils/bin/releases/assets/155860492) with score 21 lower than 46
   • Checking binary from https://api.github.com/repos/marcosnils/bin/releases/assets/155860491
   • Starting download of https://api.github.com/repos/marcosnils/bin/releases/assets/155860491
15.15 MiB / 15.15 MiB [----------------------------------------------------------------------------------------------------------------------------------------------------------------] 100.00% 5.97 MiB p/s 3s
   • Overwrite flag set, removing file C:\Users\admin\bin\bin.exe

   ⨯ command failed            error=Error installing binary remove C:\Users\admin\bin\bin.exe: Access is denied.

Expected outcome: bin.exe updated to latest version

McPhale commented 2 months ago

I have the same issue on Windows 10 Pro, and can confirm that it also occurs in cmd as well.

marcosnils commented 2 months ago

hey! thx for reporting. I'll try to get a windows VM to test this out :pray:

graphixillusion commented 4 days ago

Still having the same issue. Any updates on this?