Skip to content

Commit 90eb8b5

Browse files
committed
[deckhouse-cli] adapt tmp removing for a new arhictecture
Signed-off-by: kerimov <[email protected]>
1 parent 8860b5a commit 90eb8b5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

internal/mirror/cmd/pull/pull.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,9 @@ func NewPuller(cmd *cobra.Command) *Puller {
248248
}
249249
}
250250
func (p *Puller) Execute() error {
251+
// Ensure temporary directory is cleaned up even if an error occurs
252+
defer p.finalCleanup()
253+
251254
if err := p.cleanupWorkingDirectory(); err != nil {
252255
return err
253256
}
@@ -268,7 +271,7 @@ func (p *Puller) Execute() error {
268271
return err
269272
}
270273

271-
return p.finalCleanup()
274+
return nil
272275
}
273276

274277
// cleanupWorkingDirectory handles cleanup of the working directory if needed

0 commit comments

Comments
 (0)