Skip to content

Commit b37c2c3

Browse files
fix: suppress errcheck lint for best-effort os.Remove on cleanup paths
1 parent ca01024 commit b37c2c3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

cmd/modern/root/open/vscode.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,9 @@ func (c *VSCode) writeSettings(path string, settings map[string]interface{}) {
204204
_, writeErr := tmp.Write(data)
205205
closeErr := tmp.Close()
206206
if writeErr != nil || closeErr != nil {
207-
os.Remove(tmpPath)
207+
_ = os.Remove(tmpPath)
208208
} else if renameErr := os.Rename(tmpPath, path); renameErr != nil {
209-
os.Remove(tmpPath)
209+
_ = os.Remove(tmpPath)
210210
} else {
211211
return // atomic write succeeded
212212
}

0 commit comments

Comments
 (0)