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

Function getGlobalPathConfig

packages/cli-config/src/cli-config.ts:128–141  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

126}
127
128export function getGlobalPathConfig(): string {
129 const vercelDirectories = XDGAppPaths('com.vercel.cli').dataDirs();
130
131 const possibleConfigPaths = [
132 ...vercelDirectories, // latest vercel directory
133 path.join(homedir(), '.now'), // legacy config in user's home directory
134 ...XDGAppPaths('now').dataDirs(), // legacy XDG directory
135 ];
136
137 return (
138 possibleConfigPaths.find(configPath => isReadableDirectory(configPath)) ||
139 vercelDirectories[0]
140 );
141}
142
143export function getConfigFilePath(configDir: string): string {
144 return path.join(configDir, 'config.json');

Callers 3

getVercelTokenFunction · 0.90
refreshTokenFunction · 0.90

Calls 3

isReadableDirectoryFunction · 0.85
joinMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected