MCPcopy Create free account
hub / github.com/chiihero/Microsoft-Rewards-Script / cleanup

Function cleanup

scripts/utils.js:202–209  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

200
201export function setupCleanupHandlers(cleanupFn) {
202 const cleanup = async () => {
203 try {
204 await cleanupFn()
205 } catch (error) {
206 log('ERROR', '清理失败:', error.message)
207 }
208 process.exit(0)
209 }
210
211 process.on('SIGINT', cleanup)
212 process.on('SIGTERM', cleanup)

Callers

nothing calls this directly

Calls 1

logFunction · 0.85

Tested by

no test coverage detected