MCPcopy Create free account
hub / github.com/VirtualHotBar/NetMount / runStep

Function runStep

src/controller/main.ts:95–111  ·  view source on GitHub ↗
(label: string, fn: () => Promise<unknown>)

Source from the content-addressed store, hash-verified

93
94 const failedSteps = new Set<string>()
95 const runStep = async (label: string, fn: () => Promise<unknown>) => {
96 try {
97 await fn()
98 return true
99 } catch (e) {
100 console.error(`[startup] ${label} failed:`, e)
101 if (!failedSteps.has(label)) {
102 failedSteps.add(label)
103 Notification.warning({
104 id: `startup_step_failed_${label.replace(/\s+/g, '_')}`,
105 title: t('warning'),
106 content: t('startup_task_failed', { step: label }),
107 })
108 }
109 return false
110 }
111 }
112
113 hooks.retryStartupStorageSync = async () => {
114 hooks.startup.storageSyncing = true

Callers 1

Calls 1

addMethod · 0.80

Tested by

no test coverage detected