Skip to content

Commit

Permalink
cmd/edit: fix return error value
Browse files Browse the repository at this point in the history
In case the file cannot be opened the error being return is 'nil', which
is, obviously, wrong. Fix it to return the error returned by
`ioutil.ReadFile()`.

Signed-off-by: Bruno Meneguele <[email protected]>
  • Loading branch information
bmeneg committed Feb 2, 2022
1 parent 37ca9c7 commit 036ff5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/edit_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func editDescription(title string, body string, msgs []string, filename string)

content, err := ioutil.ReadFile(filename)
if err != nil {
return "", "", nil
return "", "", err
}
lines = strings.Split(string(content), "\n")

Expand Down

0 comments on commit 036ff5e

Please sign in to comment.