(dir: string)
| 564 | } |
| 565 | |
| 566 | export function clearAllCredentialsStrict(dir: string) { |
| 567 | const configPath = cliConfig.getAuthConfigFilePath(dir); |
| 568 | const runtimeFlags = readRuntimeFlags(); |
| 569 | |
| 570 | let fileError: unknown; |
| 571 | let keyringError: unknown; |
| 572 | |
| 573 | try { |
| 574 | deleteCredentialsFile(configPath); |
| 575 | } catch (error) { |
| 576 | fileError = error; |
| 577 | } |
| 578 | |
| 579 | try { |
| 580 | deleteCredentialsFromKeyring(configPath, runtimeFlags); |
| 581 | } catch (error) { |
| 582 | if (!isKeyringUnavailableError(error)) { |
| 583 | keyringError = error; |
| 584 | } |
| 585 | } |
| 586 | |
| 587 | if (keyringError) { |
| 588 | throw keyringError; |
| 589 | } |
| 590 | |
| 591 | if (fileError) { |
| 592 | throw fileError; |
| 593 | } |
| 594 | } |
no test coverage detected