[Kindle NT] fix terminal and timesync (#12765)

Closes #12760
Credits go to @benoit-pierre (Thank you!)
This commit is contained in:
mergen3107
2024-11-23 13:30:48 -05:00
committed by GitHub
parent d1d5e949a0
commit e95541ffd3
3 changed files with 23 additions and 13 deletions

View File

@@ -1635,4 +1635,14 @@ function util.round_decimal(num, points)
return math.floor(num * op) / op
end
function util.which(command, path)
path = path or os.getenv("PATH") or ""
for p in path:gmatch("([^:]+)") do
p = p .. "/" .. command
if ffiUtil.isExecutable(p) then
return p
end
end
end
return util