Skip to content

Commit 2b72f37

Browse files
Copilotbytemain
andauthored
Polish uv-build validation naming
Agent-Logs-Url: https://github.com/version-fox/vfox-python/sessions/a8ca8eda-5106-4cb0-adc3-ba11681c1d0f Co-authored-by: bytemain <13938334+bytemain@users.noreply.github.com>
1 parent 716024e commit 2b72f37

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/util.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ local function trimTrailingSlash(value)
267267
return string.gsub(value, "/+$", "")
268268
end
269269

270-
local function isEmptyString(value)
270+
local function isNilOrEmpty(value)
271271
return value == nil or value == ""
272272
end
273273

@@ -603,8 +603,8 @@ function uvBuildPreInstall(version)
603603
if uvBuildPackage == nil then
604604
error("uv-build PreInstall did not provide install metadata")
605605
end
606-
if isEmptyString(uvBuildPackage.url) or isEmptyString(uvBuildPackage.sha256) then
607-
error("uv-build PreInstall did not provide required url and sha256 fields")
606+
if isNilOrEmpty(uvBuildPackage.url) or isNilOrEmpty(uvBuildPackage.sha256) then
607+
error("uv-build PreInstall url and sha256 must not be empty")
608608
end
609609
return uvBuildPackage
610610
end

0 commit comments

Comments
 (0)