mirror of
https://github.com/astral-sh/setup-uv.git
synced 2025-04-07 07:58:48 -04:00
Use D:\a\_tmp\setup-uv-cache as default cacheLocalPath on Windows
This commit is contained in:
parent
4beb0eca42
commit
824f2fc2c8
4 changed files with 53 additions and 4 deletions
|
@ -26,7 +26,7 @@ inputs:
|
||||||
required: false
|
required: false
|
||||||
cache-local-path:
|
cache-local-path:
|
||||||
description: "Local path to store the cache."
|
description: "Local path to store the cache."
|
||||||
default: "/tmp/setup-uv-cache"
|
default: ""
|
||||||
outputs:
|
outputs:
|
||||||
uv-version:
|
uv-version:
|
||||||
description: "The installed uv version. Useful when using latest."
|
description: "The installed uv version. Useful when using latest."
|
||||||
|
|
19
dist/save-cache/index.js
generated
vendored
19
dist/save-cache/index.js
generated
vendored
|
@ -83004,16 +83004,33 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
__setModuleDefault(result, mod);
|
__setModuleDefault(result, mod);
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||||
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||||
|
};
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.cacheDependencyGlob = exports.githubToken = exports.cacheLocalPath = exports.cacheSuffix = exports.enableCache = exports.checkSum = exports.version = void 0;
|
exports.cacheDependencyGlob = exports.githubToken = exports.cacheLocalPath = exports.cacheSuffix = exports.enableCache = exports.checkSum = exports.version = void 0;
|
||||||
const core = __importStar(__nccwpck_require__(2186));
|
const core = __importStar(__nccwpck_require__(2186));
|
||||||
|
const path_1 = __importDefault(__nccwpck_require__(1017));
|
||||||
exports.version = core.getInput("version");
|
exports.version = core.getInput("version");
|
||||||
exports.checkSum = core.getInput("checksum");
|
exports.checkSum = core.getInput("checksum");
|
||||||
exports.enableCache = core.getInput("enable-cache") === "true";
|
exports.enableCache = core.getInput("enable-cache") === "true";
|
||||||
exports.cacheSuffix = core.getInput("cache-suffix") || "";
|
exports.cacheSuffix = core.getInput("cache-suffix") || "";
|
||||||
exports.cacheLocalPath = core.getInput("cache-local-path");
|
exports.cacheLocalPath = getCacheLocalPath();
|
||||||
exports.githubToken = core.getInput("github-token");
|
exports.githubToken = core.getInput("github-token");
|
||||||
exports.cacheDependencyGlob = core.getInput("cache-dependency-glob");
|
exports.cacheDependencyGlob = core.getInput("cache-dependency-glob");
|
||||||
|
function getCacheLocalPath() {
|
||||||
|
const cacheLocalPathInput = core.getInput("cache-local-path");
|
||||||
|
if (cacheLocalPathInput !== "") {
|
||||||
|
return cacheLocalPathInput;
|
||||||
|
}
|
||||||
|
if (process.env.RUNNER_TEMP !== undefined) {
|
||||||
|
return `${process.env.RUNNER_TEMP}${path_1.default.sep}setup-uv-cache`;
|
||||||
|
}
|
||||||
|
if (process.platform === "win32") {
|
||||||
|
return "D:\\a\\_temp\\setup-uv-cache";
|
||||||
|
}
|
||||||
|
return "/tmp/setup-uv-cache";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
19
dist/setup/index.js
generated
vendored
19
dist/setup/index.js
generated
vendored
|
@ -85908,16 +85908,33 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
__setModuleDefault(result, mod);
|
__setModuleDefault(result, mod);
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||||
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||||
|
};
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.cacheDependencyGlob = exports.githubToken = exports.cacheLocalPath = exports.cacheSuffix = exports.enableCache = exports.checkSum = exports.version = void 0;
|
exports.cacheDependencyGlob = exports.githubToken = exports.cacheLocalPath = exports.cacheSuffix = exports.enableCache = exports.checkSum = exports.version = void 0;
|
||||||
const core = __importStar(__nccwpck_require__(2186));
|
const core = __importStar(__nccwpck_require__(2186));
|
||||||
|
const path_1 = __importDefault(__nccwpck_require__(1017));
|
||||||
exports.version = core.getInput("version");
|
exports.version = core.getInput("version");
|
||||||
exports.checkSum = core.getInput("checksum");
|
exports.checkSum = core.getInput("checksum");
|
||||||
exports.enableCache = core.getInput("enable-cache") === "true";
|
exports.enableCache = core.getInput("enable-cache") === "true";
|
||||||
exports.cacheSuffix = core.getInput("cache-suffix") || "";
|
exports.cacheSuffix = core.getInput("cache-suffix") || "";
|
||||||
exports.cacheLocalPath = core.getInput("cache-local-path");
|
exports.cacheLocalPath = getCacheLocalPath();
|
||||||
exports.githubToken = core.getInput("github-token");
|
exports.githubToken = core.getInput("github-token");
|
||||||
exports.cacheDependencyGlob = core.getInput("cache-dependency-glob");
|
exports.cacheDependencyGlob = core.getInput("cache-dependency-glob");
|
||||||
|
function getCacheLocalPath() {
|
||||||
|
const cacheLocalPathInput = core.getInput("cache-local-path");
|
||||||
|
if (cacheLocalPathInput !== "") {
|
||||||
|
return cacheLocalPathInput;
|
||||||
|
}
|
||||||
|
if (process.env.RUNNER_TEMP !== undefined) {
|
||||||
|
return `${process.env.RUNNER_TEMP}${path_1.default.sep}setup-uv-cache`;
|
||||||
|
}
|
||||||
|
if (process.platform === "win32") {
|
||||||
|
return "D:\\a\\_temp\\setup-uv-cache";
|
||||||
|
}
|
||||||
|
return "/tmp/setup-uv-cache";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
|
@ -1,9 +1,24 @@
|
||||||
import * as core from "@actions/core";
|
import * as core from "@actions/core";
|
||||||
|
import path from "path";
|
||||||
|
|
||||||
export const version = core.getInput("version");
|
export const version = core.getInput("version");
|
||||||
export const checkSum = core.getInput("checksum");
|
export const checkSum = core.getInput("checksum");
|
||||||
export const enableCache = core.getInput("enable-cache") === "true";
|
export const enableCache = core.getInput("enable-cache") === "true";
|
||||||
export const cacheSuffix = core.getInput("cache-suffix") || "";
|
export const cacheSuffix = core.getInput("cache-suffix") || "";
|
||||||
export const cacheLocalPath = core.getInput("cache-local-path");
|
export const cacheLocalPath = getCacheLocalPath();
|
||||||
export const githubToken = core.getInput("github-token");
|
export const githubToken = core.getInput("github-token");
|
||||||
export const cacheDependencyGlob = core.getInput("cache-dependency-glob");
|
export const cacheDependencyGlob = core.getInput("cache-dependency-glob");
|
||||||
|
|
||||||
|
function getCacheLocalPath(): string {
|
||||||
|
const cacheLocalPathInput = core.getInput("cache-local-path");
|
||||||
|
if (cacheLocalPathInput !== "") {
|
||||||
|
return cacheLocalPathInput;
|
||||||
|
}
|
||||||
|
if (process.env.RUNNER_TEMP !== undefined) {
|
||||||
|
return `${process.env.RUNNER_TEMP}${path.sep}setup-uv-cache`;
|
||||||
|
}
|
||||||
|
if (process.platform === "win32") {
|
||||||
|
return "D:\\a\\_temp\\setup-uv-cache";
|
||||||
|
}
|
||||||
|
return "/tmp/setup-uv-cache";
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue