Open Bios-Marcel opened 7 months ago
Windows doesn't allow deleting the current process executable. You can however move it and create a new file in the old spot.
Note that we are also getting errors for updating the shims. Technically, we can just omit replacing the shim executable, as it should be the same.
Additionally, we don't actually want to do an in-place update right now, as spoon is installed via scoop. I need to check whether this actually means we don't have a problem here.
IF there is still a problem, it might be wiser to actually provide a different way of installing spoon. The user could simply download the executable and then execute some type of setup
command maybe, instructions may look something like this:
download URL/spoon.exe; ./spoon.exe setup
This would then create a shim and whatever else would be required.
Currently, self-updating doesn't work, as scoop indicates we are still running.
I need to investigate whether this would be an issue if we were to install a new version and re-link.
The workaround is currently up to the user, instead running:
scoop update spoon
.