self_update icon indicating copy to clipboard operation
self_update copied to clipboard

How to restart the process to update?

Open niklasf opened this issue 3 years ago • 2 comments

On Unix it's possible to replace the current process with the updated version using https://doc.rust-lang.org/stable/std/os/unix/process/trait.CommandExt.html#tymethod.exec. Could this crate provide mechanisms for other platforms?

niklasf avatar Nov 26 '20 00:11 niklasf

The closest thing I could find is https://github.com/lichess-org/fishnet/blob/90f12cd532a43002a276302738f916210a2d526d/src/main.rs#L428-L439, which is good enough for my use case, but not a general purpose solution.

niklasf avatar Sep 01 '22 23:09 niklasf

Thank you very much, your workaround is pretty nice. Would be awesome if self_update handles the restart part automatically.

RouHim avatar Nov 13 '23 12:11 RouHim