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

Function getUserScriptsDir

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

Source from the content-addressed store, hash-verified

295}
296
297async function getUserScriptsDir(pythonPath: string): Promise<string | null> {
298 const code =
299 `import sys, sysconfig; print(sysconfig.get_path('scripts', scheme=('nt_user' if sys.platform == 'win32' else 'posix_user')))`.replace(
300 /\n/g,
301 ' '
302 );
303 try {
304 const { stdout } = await execa(pythonPath, ['-c', code]);
305 const out = stdout.trim();
306 return out || null;
307 } catch (err) {
308 debug('Failed to resolve Python user scripts directory', err);
309 return null;
310 }
311}
312
313export async function findUvBinary(pythonPath: string): Promise<string | null> {
314 const buildImageUv = findUvOnBuildImage();

Callers 1

findUvBinaryFunction · 0.85

Calls 3

debugFunction · 0.90
execaFunction · 0.85
replaceMethod · 0.80

Tested by

no test coverage detected