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

Function cleanup

scripts/utils.js:239–246  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

237
238export function setupCleanupHandlers(cleanupFn) {
239 const cleanup = async () => {
240 try {
241 await cleanupFn()
242 } catch (error) {
243 log('ERROR', 'Cleanup failed:', error.message)
244 }
245 process.exit(0)
246 }
247
248 process.on('SIGINT', cleanup)
249 process.on('SIGTERM', cleanup)

Callers

nothing calls this directly

Calls 1

logFunction · 0.85

Tested by

no test coverage detected