MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / checkForUpdateInBackground

Function checkForUpdateInBackground

src/upgrade/update-check.ts:239–250  ·  view source on GitHub ↗
(
  deps: UpdateCheckDeps = {},
  log: (line: string) => void = (line) => process.stderr.write(line),
)

Source from the content-addressed store, hash-verified

237 * never blocks, never writes stdout.
238 */
239export function checkForUpdateInBackground(
240 deps: UpdateCheckDeps = {},
241 log: (line: string) => void = (line) => process.stderr.write(line),
242): void {
243 refreshUpdateCheck(deps)
244 .then((notice) => {
245 // The shared notice sentence starts with "CodeGraph …"; drop the word
246 // after the log tag so the line doesn't read "[CodeGraph] CodeGraph …".
247 if (notice) log(`[CodeGraph] ${notice.replace(/^CodeGraph /, '')}\n`);
248 })
249 .catch(() => { /* fail silent */ });
250}

Callers 2

startMethod · 0.90

Calls 2

refreshUpdateCheckFunction · 0.85
writeMethod · 0.45

Tested by

no test coverage detected