-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
[Feature request]: program update from within program itself #1097
Comments
Well actually, it's not a common thing for programs(especially cli ones) to self update, that's what package managers are meant for. I guess you are using Windows, but even windows has chocolatey the package manager and fabric already has a That is not the same as downloading prebuilt fabric binaries but fabric is not a project that takes a lot of time to compile so it's not a big deal. If you still want to download fabric binaries only I would suggest you to "install" your If the |
yt-dlp is a popular cli program that runs on windows and can self update, which is a very useful feature. So it is fully possible to do. Your concerns about read only locations and escalation of privileges are not difficult to address. If the update location is read-only the program can just say so and exit. If the original binary file comes from another source than this fabric github repository I think executing that file is just as risky, with or without the update option. A tampered file could ask for priviledge escalation also when the user uses an existing option like updating patterns. The obvious thing to do in this case is to make sure binaries are downloaded from their official sources. Doing a quick search I found the cross platform code written in go. See here: https://github.com/minio/selfupdate |
What do you need?
I would like the program to update itself when given the --update switch. I have set up a batch script (update.bat) that does this for me, but I think it should be a functionality within the program.
My batch script is given below. It downloads the latest release file from GitHub, compares to the existing file, and if the files differ it replaces the existing file with the downloaded one.
The text was updated successfully, but these errors were encountered: