mirror of
https://github.com/pesde-pkg/tooling.git
synced 2025-03-04 02:51:47 +00:00
fix(lib): use expiration time units in seconds
`os.time()` returns a timestamp in seconds, not milliseconds, but the expiration time was adding 60,000 assuming it was in milliseconds. This has now been corrected to only add 60 in seconds.
This commit is contained in:
parent
e03f07470d
commit
78577110cf
1 changed files with 1 additions and 1 deletions
|
@ -217,7 +217,7 @@ function installTool(tool: ToolId, installPath: pathfs.Path): number
|
||||||
-- Write a lock file to prevent concurrent installation attempts
|
-- Write a lock file to prevent concurrent installation attempts
|
||||||
local lockFile: InstallLock = {
|
local lockFile: InstallLock = {
|
||||||
resource = installPath:toString(),
|
resource = installPath:toString(),
|
||||||
expiration = os.time() + 60_000, -- lock expires in 60s from time of issue
|
expiration = os.time() + 60, -- lock expires in 60s from time of issue
|
||||||
}
|
}
|
||||||
|
|
||||||
pathfs.writeFile(installLockFile, serde.encode("json", lockFile))
|
pathfs.writeFile(installLockFile, serde.encode("json", lockFile))
|
||||||
|
|
Loading…
Add table
Reference in a new issue