From 78577110cf86c665f971bfbaec561da07b6a4228 Mon Sep 17 00:00:00 2001 From: Erica Marigold Date: Wed, 5 Feb 2025 12:11:10 +0530 Subject: [PATCH] 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. --- toolchainlib/src/init.luau | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolchainlib/src/init.luau b/toolchainlib/src/init.luau index d5adf88..8019246 100644 --- a/toolchainlib/src/init.luau +++ b/toolchainlib/src/init.luau @@ -217,7 +217,7 @@ function installTool(tool: ToolId, installPath: pathfs.Path): number -- Write a lock file to prevent concurrent installation attempts local lockFile: InstallLock = { 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))