Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install fails on windows #14

Closed
rsteube opened this issue Dec 7, 2024 · 0 comments · Fixed by #15
Closed

Install fails on windows #14

rsteube opened this issue Dec 7, 2024 · 0 comments · Fixed by #15
Labels
bug Something isn't working fund Fundable with polar.sh windows

Comments

@rsteube
Copy link
Member

rsteube commented Dec 7, 2024

Current Behavior

Unable to rename file on windows:

❯ carapace --selfupdate nightly 2024-12-07 carapace-bin_1.0.7-SNAPSHOT-c346f9fd_windows_amd64.zip
downloading to "C:\\Users\\steam\\AppData\\Local\\Temp\\carapace-selfupdate_4158742067.zip"
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 12.3M  100 12.3M    0     0  2415k      0  0:00:05  0:00:05 --:--:-- 2907k
overwrite "C:\\Users\\steam\\go\\bin\\carapace.exe.selfupdate"? [y/n]: y
extracting to "C:\\Users\\steam\\go\\bin\\carapace.exe.selfupdate"
x carapace.exe
executing "C:\\Users\\steam\\go\\bin\\carapace.exe.selfupdate --version"
carapace-bin 1.0.7-SNAPSHOT-c346f9fd (2024-12-07T01:07:44Z) [c346f9fd7ab527754bd896422974481346978ea2]
overwrite "C:\\Users\\steam\\go\\bin\\carapace.exe"? [y/n]: y
moving to "C:\\Users\\steam\\go\\bin\\carapace.exe"
Error: rename C:\Users\steam\go\bin\carapace.exe.selfupdate C:\Users\steam\go\bin\carapace.exe: Access is denied.
Usage:
  selfupdate [source] [tag] [asset] [flags]

Flags:
  -a, --all     show all tags/assets
  -f, --force   force
  -h, --help    help for selfupdate

Expected Behavior

Installs successfully.

Steps To Reproduce

No response

Version

v0.0.6

Anything else?

Seems windows has issues swapping the running executable:

https://github.com/sanbornm/go-selfupdate/blob/e1c03e3d6ac7f1c43cf57c51a28cac3b31041ed0/selfupdate/selfupdate.go#L279

@rsteube rsteube added bug Something isn't working fund Fundable with polar.sh windows labels Dec 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fund Fundable with polar.sh windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant