autorestic
autorestic copied to clipboard
Fix upgrade command
fix #191
Hi, Sorry for the new PR :), you will have a lot of work to review all of them I tried to solve the problem mentioned in the above issue with a code inspired by restic self-update command https://github.com/restic/restic/blob/master/internal/selfupdate/download.go#L43
The main thing is to create the temporary file in the install directory then you can rename.
I also removed the dependency to the deprecated ioutil
library (see https://pkg.go.dev/io/ioutil)