()
| 277 | * `vercel build`, where an explicit login is still needed). |
| 278 | */ |
| 279 | export function existingRegistryAuthFile(): string | undefined { |
| 280 | const explicit = readString(process.env.REGISTRY_AUTH_FILE); |
| 281 | if (explicit) { |
| 282 | return existsSync(explicit) ? explicit : undefined; |
| 283 | } |
| 284 | const fromXdg = readString(process.env.XDG_CONFIG_HOME); |
| 285 | const configHome = fromXdg || join(homedir(), '.config'); |
| 286 | const defaultPath = join(configHome, 'containers', 'auth.json'); |
| 287 | return existsSync(defaultPath) ? defaultPath : undefined; |
| 288 | } |
no test coverage detected