( configPath: string, credentials: Credentials, runtimeFlags: RuntimeFlags )
| 408 | } |
| 409 | |
| 410 | function writeAutoStorageCredentials( |
| 411 | configPath: string, |
| 412 | credentials: Credentials, |
| 413 | runtimeFlags: RuntimeFlags |
| 414 | ): CredentialsStorageLocation { |
| 415 | try { |
| 416 | return writeKeyringStorageCredentials( |
| 417 | configPath, |
| 418 | credentials, |
| 419 | runtimeFlags |
| 420 | ); |
| 421 | } catch { |
| 422 | deleteCredentialsFromKeyringIfAvailable(configPath, runtimeFlags); |
| 423 | return writeFileStorageCredentials(configPath, credentials, runtimeFlags); |
| 424 | } |
| 425 | } |
| 426 | |
| 427 | function deleteFileStorageCredentials( |
| 428 | configPath: string, |
no test coverage detected