(secretPath: string)
| 41 | } |
| 42 | |
| 43 | function readSecretIfPresent(secretPath: string): string | null { |
| 44 | try { |
| 45 | const secretValue = getFsImplementation() |
| 46 | .readFileSync(secretPath, { encoding: 'utf8' }) |
| 47 | .trim() |
| 48 | return secretValue.length > 0 ? secretValue : null |
| 49 | } catch { |
| 50 | return null |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | export function loadFileBackedSecrets(): void { |
| 55 | const configDir = getNcodeConfigHomeDir() |
no test coverage detected