MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / clearAwsIniCache

Function clearAwsIniCache

source code/utils/aws.ts:63–76  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

61 * This ensures that any changes to ~/.aws/credentials are picked up immediately
62 */
63export async function clearAwsIniCache(): Promise<void> {
64 try {
65 logForDebugging('Clearing AWS credential provider cache')
66 const { fromIni } = await import('@aws-sdk/credential-providers')
67 const iniProvider = fromIni({ ignoreCache: true })
68 await iniProvider() // This updates the global file cache
69 logForDebugging('AWS credential provider cache refreshed')
70 } catch (_error) {
71 // Ignore errors - we're just clearing the cache
72 logForDebugging(
73 'Failed to clear AWS credential cache (this is expected if no credentials are configured)',
74 )
75 }
76}

Callers 1

auth.tsFile · 0.85

Calls 1

logForDebuggingFunction · 0.85

Tested by

no test coverage detected