From f57cd300312b8de0b5cfb97049c554bbf8af143f Mon Sep 17 00:00:00 2001 From: luphaz Date: Thu, 23 Jan 2020 11:00:57 +0100 Subject: [PATCH] DELIVERY-225 fix file not found 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 --- s3update.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/s3update.go b/s3update.go index a533701..1a3e3e8 100644 --- a/s3update.go +++ b/s3update.go @@ -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 }