MCPcopy Index your code
hub / github.com/codeaashu/claude-code / clearAwsIniCache

Function clearAwsIniCache

src/utils/aws.ts:61–74  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

auth.tsFile · 0.85

Calls 1

logForDebuggingFunction · 0.85

Tested by

no test coverage detected