Skip to content

Commit

Permalink
chore: try to fix G104 errors unhandled
Browse files Browse the repository at this point in the history
  • Loading branch information
soulteary committed Jun 13, 2022
1 parent 51f83ab commit 33862d9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkgs/vfs/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,10 @@ func WriteFile(fs VFS, path string, data []byte, perm os.FileMode) error {
}
_, err = f.Write(data)
if err != nil {
f.Close()
errClose := f.Close()
if errClose != nil {
return err
}
return err
}
return f.Close()
Expand Down

0 comments on commit 33862d9

Please sign in to comment.