(
deps: UpdateCheckDeps = {},
log: (line: string) => void = (line) => process.stderr.write(line),
)
| 237 | * never blocks, never writes stdout. |
| 238 | */ |
| 239 | export 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 | } |
no test coverage detected