MCPcopy
hub / github.com/claude-code-best/claude-code / enableConfigs

Function enableConfigs

src/utils/config.ts:1342–1364  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1340let configReadingAllowed = false
1341
1342export function enableConfigs(): void {
1343 if (configReadingAllowed) {
1344 // Ensure this is idempotent
1345 return
1346 }
1347
1348 const startTime = Date.now()
1349 logForDiagnosticsNoPII('info', 'enable_configs_started')
1350
1351 // Any reads to configuration before this flag is set show an console warning
1352 // to prevent us from adding config reading during module initialization
1353 configReadingAllowed = true
1354 // We only check the global config because currently all the configs share a file
1355 getConfig(
1356 getGlobalClaudeFile(),
1357 createDefaultGlobalConfig,
1358 true /* throw on invalid */,
1359 )
1360
1361 logForDiagnosticsNoPII('info', 'enable_configs_completed', {
1362 duration_ms: Date.now() - startTime,
1363 })
1364}
1365
1366/**
1367 * Returns the directory where config backup files are stored.

Callers 9

mainFunction · 0.85
runComputerUseMcpServerFunction · 0.85
bridgeMainFunction · 0.85
runBridgeHeadlessFunction · 0.85
mainFunction · 0.85
init.tsFile · 0.85
runAcpAgentFunction · 0.85
createSessionFunction · 0.85

Calls 3

logForDiagnosticsNoPIIFunction · 0.85
nowMethod · 0.80
getConfigFunction · 0.70

Tested by

no test coverage detected