Skip to content

Commit 190de15

Browse files
zachallerCI
authored andcommitted
fix: temp dir creation (#24)
* fix temp dir creation Signed-off-by: zachaller <zachaller@users.noreply.github.com> * wrap error instead of printing Signed-off-by: zachaller <zachaller@users.noreply.github.com> Signed-off-by: zachaller <zachaller@users.noreply.github.com>
1 parent 37d4396 commit 190de15

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

pkg/extension/context.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,10 @@ func (c *extensionContext) Process(ctx context.Context) error {
9393
}
9494

9595
// download all extension files into temp directory
96-
tempDir := os.TempDir()
96+
tempDir, err := os.MkdirTemp("", "")
97+
if err != nil {
98+
return fmt.Errorf("failed to create temp dir %w", err)
99+
}
97100
defer func() {
98101
if err := os.RemoveAll(tempDir); err != nil {
99102
log.Error(err, "Failed to delete temp directory")

0 commit comments

Comments
 (0)