setup-cpp/src/check-updates.ts

13 lines
383 B
TypeScript
Raw Normal View History

import { warning } from "ci-log"
import updateNotifier from "simple-update-notifier"
2023-05-25 14:47:45 +08:00
import packageJson from "../package-version.json"
// auto self update notifier
export async function checkUpdates() {
try {
await updateNotifier({ pkg: packageJson })
} catch (err) {
2023-05-24 12:37:34 +08:00
warning(`Failed to check for updates: ${err instanceof Error ? err.message + err.stack : err}`)
}
}