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

Function enableConfigs

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

Source from the content-addressed store, hash-verified

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

Callers 7

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

Calls 2

logForDiagnosticsNoPIIFunction · 0.85
getConfigFunction · 0.70

Tested by

no test coverage detected