sg: run "chmod +x" if executable has been updated
Created by: mrnugget
This might fix the "permission denied" after update bug as reported here and here.
Test plan
- Run this without the changes in this PR to confirm that the behaviour can be replicated:
$ go install -ldflags "-X main.BuildCommit=6f8e52dd98" -mod=mod . # 6f8e... is just an old commit
$ sg start
ℹ️ Auto updating sg ...
✅ sg has been updated!
To see what's new, run 'sg version changelog'.
⚠️ update check: permission denied
- Run it with changes in this PR and see that "update check: permission denied" disappears