currency: honor CODEBURN_CACHE_DIR for the exchange-rate cache (#766)

The one cache module still hardcoding ~/.cache/codeburn; every other
cache (session, daily, codex, pricing) honors the relocation override,
so a user moving the cache dir kept getting this single file in the
default location. Found by the pre-release functional sweep.
This commit is contained in:
Resham Joshi 2026-07-20 08:28:29 -07:00 • committed by GitHub
parent dbd93fee51
commit d8158afb1b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -73,7 +73,10 @@ export function roundForActiveCurrency(value: number): number {
}
function getCacheDir(): string {
return join(homedir(), '.cache', 'codeburn')
// Honor the same relocation override every other cache module uses
// (session-cache, daily-cache, codex-cache, models); this was the one
// straggler still hardcoding the default path.
return process.env['CODEBURN_CACHE_DIR'] ?? join(homedir(), '.cache', 'codeburn')
}
function getRateCachePath(): string {