From f4f05b826419744e8392c2efaa236400ab020dbe Mon Sep 17 00:00:00 2001 From: Erica Marigold Date: Thu, 16 Jan 2025 08:48:03 +0000 Subject: [PATCH] fix(lib): TypeError in `extractEntry` function for zip --- toolchainlib/src/compression.luau | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/toolchainlib/src/compression.luau b/toolchainlib/src/compression.luau index eac01d2..6306e8e 100644 --- a/toolchainlib/src/compression.luau +++ b/toolchainlib/src/compression.luau @@ -46,7 +46,7 @@ local extractBinary: { local reader = unzip.load(compressed) local binaryContents: buffer? - --- Extracts a specific entry from the ZIP and validates that its `PlatformDescriptor` + --- Extracts a specific entry from the ZIP and validates that its `PlatformDescriptor` --- matches the expected one local function extractEntry(entry: unzip.ZipEntry): buffer? local contents = reader:extract(entry, { type = "binary" }) :: buffer @@ -55,8 +55,9 @@ local extractBinary: { if executablePlatform:isOk() and eq(executablePlatform:unwrap(), targetPlatform) then return contents end - end + return nil + end -- Find the entry and attempt to extract it local binaryEntry = reader:findEntry(binaryName)