Skip to content

Commit

Permalink
fix: better error messages in self update
Browse files Browse the repository at this point in the history
  • Loading branch information
debdutdeb committed Mar 21, 2024
1 parent ce1f52e commit d6ac0b2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions update_check.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,14 @@ func startCheckUpdate() (chan bool, chan bool) {
log.Fatalf("failed to get novm binary to upgrade: %v", err)
}

dst, err := os.OpenFile(novmBin, os.O_WRONLY|os.O_TRUNC, 0750)
src, err := os.Open(tmpDownload)
if err != nil {
log.Fatalf("failed to updated binary: %v", err)
log.Fatalf("failed to updated binary (%s): %v", tmpDownload, err)
}

src, err := os.Open(tmpDownload)
dst, err := os.OpenFile(novmBin, os.O_WRONLY|os.O_TRUNC, 0750)
if err != nil {
log.Fatalf("failed to updated binary: %v", err)
log.Fatalf("failed to updated binary (%s): %v", novmBin, err)
}

io.Copy(dst, src)
Expand Down

0 comments on commit d6ac0b2

Please # to comment.