Skip to content

Commit

Permalink
Merge pull request #3 from skilld-labs/74-temp_file_delete_after_copy
Browse files Browse the repository at this point in the history
74: delete temp file after copy
  • Loading branch information
davidferlay authored Mar 15, 2024
2 parents 6d0e7b2 + 6df3ad8 commit e1b214e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions package.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,5 +164,10 @@ func createArchive(srcDir, archiveTempDir, archiveFinalDir, archiveDestFile stri
return fmt.Errorf("error copying archive to artifact directory: %v", err)
}

// Delete temp file from archive temp directory.
if err := os.Remove(path.Clean(archivePath)); err != nil {
return fmt.Errorf("error deleting temp file: %v", err)
}

return nil
}

0 comments on commit e1b214e

Please sign in to comment.