mirror of
https://github.com/astral-sh/setup-uv.git
synced 2025-05-19 07:34:45 +00:00
Use uv from tool-cache to prune cache
This commit is contained in:
parent
f95cd8710c
commit
928a502318
6 changed files with 32 additions and 4 deletions
20
dist/save-cache/index.js
generated
vendored
20
dist/save-cache/index.js
generated
vendored
|
@ -91671,6 +91671,7 @@ const exec = __importStar(__nccwpck_require__(5236));
|
|||
const fs = __importStar(__nccwpck_require__(3024));
|
||||
const restore_cache_1 = __nccwpck_require__(5391);
|
||||
const inputs_1 = __nccwpck_require__(9612);
|
||||
const constants_1 = __nccwpck_require__(6156);
|
||||
async function run() {
|
||||
try {
|
||||
if (inputs_1.enableCache) {
|
||||
|
@ -91722,8 +91723,10 @@ async function saveCache() {
|
|||
}
|
||||
}
|
||||
async function pruneCache() {
|
||||
const uvDir = core.getState(constants_1.STATE_CACHED_UV_DIR);
|
||||
const options = {
|
||||
silent: !core.isDebug(),
|
||||
silent: false,
|
||||
env: { PATH: uvDir },
|
||||
};
|
||||
const execArgs = ["cache", "prune", "--ci"];
|
||||
core.info("Pruning cache...");
|
||||
|
@ -91732,6 +91735,21 @@ async function pruneCache() {
|
|||
run();
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 6156:
|
||||
/***/ ((__unused_webpack_module, exports) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.STATE_CACHED_UV_DIR = exports.TOOL_CACHE_NAME = exports.OWNER = exports.REPO = void 0;
|
||||
exports.REPO = "uv";
|
||||
exports.OWNER = "astral-sh";
|
||||
exports.TOOL_CACHE_NAME = "uv";
|
||||
exports.STATE_CACHED_UV_DIR = "cached-uv-dir";
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 9612:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue