mirror of
https://github.com/aminya/setup-cpp
synced 2024-11-30 21:22:30 +08:00
13 lines
383 B
TypeScript
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}`)
|
|
}
|
|
}
|