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

Function getGlobalScriptsDir

packages/python/src/uv.ts:285–295  ·  view source on GitHub ↗
(pythonPath: string)

Source from the content-addressed store, hash-verified

283}
284
285async function getGlobalScriptsDir(pythonPath: string): Promise<string | null> {
286 const code = `import sysconfig; print(sysconfig.get_path('scripts'))`;
287 try {
288 const { stdout } = await execa(pythonPath, ['-c', code]);
289 const out = stdout.trim();
290 return out || null;
291 } catch (err) {
292 debug('Failed to resolve Python global scripts directory', err);
293 return null;
294 }
295}
296
297async function getUserScriptsDir(pythonPath: string): Promise<string | null> {
298 const code =

Callers 1

findUvBinaryFunction · 0.85

Calls 2

debugFunction · 0.90
execaFunction · 0.85

Tested by

no test coverage detected