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

Function setupCleanupHandlers

scripts/utils.js:238–250  ·  view source on GitHub ↗
(cleanupFn)

Source from the content-addressed store, hash-verified

236}
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)
250}
251
252export function getSessionDbPath(projectRoot, sessionPath) {
253 const candidates = [

Callers 1

mainFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected