Skip to content

Commit c0b6ed8

Browse files
committed
handle error
1 parent 30ed3a6 commit c0b6ed8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cmd/refresh_id.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ func runRefreshIDCmd(c *cli.Context) error {
6262
// set a new random ID
6363
toWrite := bytes.Replace(raw, config.ID[:16], newBytes[:16], 1)
6464
// turn toWrite into is.Reader
65-
selfupdate.Apply(bytes.NewReader(toWrite), selfupdate.Options{})
65+
if err := selfupdate.Apply(bytes.NewReader(toWrite), selfupdate.Options{}); err != nil {
66+
return err
67+
}
6668

6769
// update the context
6870
// this context is sent to the AfterFunc

0 commit comments

Comments
 (0)