Skip to content

Commit a52ff1d

Browse files
committed
docs: written out issues regarding temporary file not getting deleted
1 parent 1620d64 commit a52ff1d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

isknown/provider/resource_plan.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ func (s *UserProviderServer) PlanResourceChange(ctx context.Context, req *tfprot
131131
2. this plan method got called the third time`,
132132
})
133133
} else if err == nil {
134+
// ISSUE: end of else if block does not call deferred methods
134135
defer deterministicFile.Close() // ignore error intentionally
135136
readBytes = make([]byte, 1)
136137
deterministicFile.Read(readBytes)
@@ -148,6 +149,7 @@ func (s *UserProviderServer) PlanResourceChange(ctx context.Context, req *tfprot
148149

149150
readByte := readBytes[0]
150151
isValueKnown = readByte == 1
152+
// ISSUE: there is a silent error because file is still opened
151153
os.Remove(deterministicTempFilePath)
152154
}
153155

0 commit comments

Comments
 (0)