MCPcopy Create free account
hub / github.com/vercel/vercel / existingRegistryAuthFile

Function existingRegistryAuthFile

packages/container/src/util.ts:279–288  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

277 * `vercel build`, where an explicit login is still needed).
278 */
279export 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}

Callers 1

buildAndPushImageFunction · 0.90

Calls 1

readStringFunction · 0.70

Tested by

no test coverage detected