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

Method cachePrune

packages/python/src/uv.ts:227–241  ·  view source on GitHub ↗

* Prune the uv cache for CI: removes pre-built wheels and unzipped source * distributions while retaining source-built wheels.

()

Source from the content-addressed store, hash-verified

225 * distributions while retaining source-built wheels.
226 */
227 async cachePrune(): Promise<void> {
228 const args = ['cache', 'prune', '--ci'];
229 const pretty = `uv ${args.join(' ')}`;
230 debug(`Running "${pretty}"...`);
231 try {
232 await execa(this.uvPath, args, {
233 env: getProtectedUvEnv(process.env, this.uvCacheDir),
234 });
235 } catch (err) {
236 // Cache pruning is best-effort; log but don't fail the build.
237 debug(
238 `Warning: ${pretty} failed: ${err instanceof Error ? err.message : String(err)}`
239 );
240 }
241 }
242
243 private async runUvCmd(
244 args: string[],

Callers 1

prepareCacheFunction · 0.95

Calls 4

debugFunction · 0.90
execaFunction · 0.85
getProtectedUvEnvFunction · 0.85
joinMethod · 0.45

Tested by

no test coverage detected