(dir: string)
| 125 | } |
| 126 | |
| 127 | export function readGlobalConfig(dir: string): GlobalConfig { |
| 128 | const configPath = cliConfig.getConfigFilePath(dir); |
| 129 | |
| 130 | try { |
| 131 | const config = cliConfig.readGlobalConfigFile(configPath); |
| 132 | |
| 133 | return { |
| 134 | credStorage: |
| 135 | typeof config.credStorage === 'undefined' |
| 136 | ? undefined |
| 137 | : resolveCredStorage(config.credStorage), |
| 138 | }; |
| 139 | } catch (error) { |
| 140 | if (isENOENTError(error)) { |
| 141 | return {}; |
| 142 | } |
| 143 | |
| 144 | throw error; |
| 145 | } |
| 146 | } |
| 147 | |
| 148 | export function getCredStorage( |
| 149 | dir: string, |
no test coverage detected