autorestic icon indicating copy to clipboard operation
autorestic copied to clipboard

Fix upgrade command

Open rdelaage opened this issue 1 year ago • 1 comments

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)

rdelaage avatar Nov 14 '22 08:11 rdelaage