From 1b12683bfc1c699b574c1483501841fbe37301f9 Mon Sep 17 00:00:00 2001 From: Terry Yiu <963907+tyiu@users.noreply.github.com> Date: Sat, 8 Jun 2024 16:02:44 -0400 Subject: [PATCH] Fix issue with downloading emoji-test.txt for Unicode v15.0 by using an alternate URL --- Sources/EmojiSourceKit/EmojiDownloader.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Sources/EmojiSourceKit/EmojiDownloader.swift b/Sources/EmojiSourceKit/EmojiDownloader.swift index 6c3edc3..c8b25b0 100644 --- a/Sources/EmojiSourceKit/EmojiDownloader.swift +++ b/Sources/EmojiSourceKit/EmojiDownloader.swift @@ -123,7 +123,11 @@ struct EmojiDownloader: ParsableCommand, AsyncParsableCommand { } func getTemporaryURLForEmojiList(version: EmojiManager.Version) async -> URL? { - return await load(urlString: "https://unicode.org/Public/emoji/\(version.versionIdentifier)/emoji-test.txt") + if version == .v15 { + return await load(urlString: "https://raw.githubusercontent.com/unicode-org/cldr/ed4f82917078fb71f093977a973b30a6151fa28b/tools/cldr-code/src/main/resources/org/unicode/cldr/util/data/emoji/emoji-test.txt") + } else { + return await load(urlString: "https://unicode.org/Public/emoji/\(version.versionIdentifier)/emoji-test.txt") + } } func getTemporaryURLForEmojiCounts(version: EmojiManager.Version) async -> URL? {