diff --git a/agent/agent.go b/agent/agent.go index 01c9ce6a38..3550b10e8a 100644 --- a/agent/agent.go +++ b/agent/agent.go @@ -1495,7 +1495,6 @@ func writeFileAtomic(path string, contents []byte) error { return err } if err := fh.Close(); err != nil { - fh.Close() os.Remove(tempPath) return err }