Template
1
0
mirror of https://github.com/aminya/setup-cpp synced 2024-11-30 21:22:30 +08:00
setup-cpp/src/check-updates.ts
2023-05-24 23:47:45 -07:00

13 lines
383 B
TypeScript

import { warning } from "ci-log"
import updateNotifier from "simple-update-notifier"
import packageJson from "../package-version.json"
// auto self update notifier
export async function checkUpdates() {
try {
await updateNotifier({ pkg: packageJson })
} catch (err) {
warning(`Failed to check for updates: ${err instanceof Error ? err.message + err.stack : err}`)
}
}