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 80d8a96 commit 31c8fcf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkgs/vfs/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ func WriteFile(fs VFS, path string, data []byte, perm os.FileMode) error {
if err != nil {
return err
}
if _, err := f.Write(data); err != nil {
_, err = f.Write(data)
if err != nil {
f.Close()
return err
}
Expand Down

0 comments on commit 31c8fcf

Please sign in to comment.