Skip to content

Commit

Permalink
Fix analytics tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jnewc committed Apr 19, 2024
1 parent be4e3bc commit 0d83604
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ extension Analytics {
func save(_ events: [Analytics.Event]) throws {
do {
let eventsData = try JSONEncoder().encode(events)
try FileManager.default.createDirectory(at: fileURL.deletingLastPathComponent(), withIntermediateDirectories: true)
try eventsData.write(to: fileURL)
} catch {
logger.error(message: "📚 Analytics: Failed to save file \(error.localizedDescription)")
Expand Down

0 comments on commit 0d83604

Please sign in to comment.