mirror of
https://github.com/pesde-pkg/tooling.git
synced 2025-03-04 02:51:47 +00:00
fix(lib): TypeError in extractEntry
function for zip
This commit is contained in:
parent
4da1e25967
commit
f4f05b8264
1 changed files with 3 additions and 2 deletions
|
@ -46,7 +46,7 @@ local extractBinary: {
|
||||||
local reader = unzip.load(compressed)
|
local reader = unzip.load(compressed)
|
||||||
local binaryContents: buffer?
|
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
|
--- matches the expected one
|
||||||
local function extractEntry(entry: unzip.ZipEntry): buffer?
|
local function extractEntry(entry: unzip.ZipEntry): buffer?
|
||||||
local contents = reader:extract(entry, { type = "binary" }) :: buffer
|
local contents = reader:extract(entry, { type = "binary" }) :: buffer
|
||||||
|
@ -55,8 +55,9 @@ local extractBinary: {
|
||||||
if executablePlatform:isOk() and eq(executablePlatform:unwrap(), targetPlatform) then
|
if executablePlatform:isOk() and eq(executablePlatform:unwrap(), targetPlatform) then
|
||||||
return contents
|
return contents
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
-- Find the entry and attempt to extract it
|
-- Find the entry and attempt to extract it
|
||||||
local binaryEntry = reader:findEntry(binaryName)
|
local binaryEntry = reader:findEntry(binaryName)
|
||||||
|
|
Loading…
Add table
Reference in a new issue