Skip to content

Commit

Permalink
DELIVERY-225 fix file not found
Browse files Browse the repository at this point in the history
Following [DELIVERY-213](https://retool.atlassian.net/browse/DELIVERY-213) we didn't fixed the error

The argument passed to `syscall.Exec` (`os.Args[0]`) suppose
relative binary will be found/resolved properly

It succeeded with `./releases/aww-darwin-amd64` and `/usr/local/bin/aww`
but failed with path call `aww`

Using absolute destination enforce the absolute resolution and hence resolves the error for further releases
  • Loading branch information
luphaz committed Jan 23, 2020
1 parent 8300cd3 commit f57cd30
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion s3update.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ func runAutoUpdate(u Updater) error {
fmt.Printf("s3update: updated with success to version %d\nRestarting application\n", remoteVersion)

// The update completed, we can now restart the application without requiring any user action.
if err := syscall.Exec(os.Args[0], os.Args, os.Environ()); err != nil {
if err := syscall.Exec(dest, os.Args, os.Environ()); err != nil {
return err
}

Expand Down

0 comments on commit f57cd30

Please sign in to comment.