fix: use fresh timestamp when setting cache entry

Use Date.now() after checkGitHubRemote() completes instead of the
pre-captured timestamp to ensure accurate 5-minute TTL.
This commit is contained in:
Stefan de Vogelaere
2026-01-17 12:36:33 +01:00
parent 2d9e38ad99
commit 5cd4183a7b

View File

@@ -161,7 +161,7 @@ async function getGitHubRemoteStatus(projectPath: string): Promise<GitHubRemoteS
const status = await checkGitHubRemote(projectPath);
githubRemoteCache.set(projectPath, {
status,
checkedAt: now,
checkedAt: Date.now(),
});
return status;