mirror of
https://github.com/astral-sh/setup-uv.git
synced 2025-10-19 00:56:43 +00:00
committed by
GitHub
parent
f9c6974d8b
commit
f2859da213
30
dist/setup/index.js
generated
vendored
30
dist/setup/index.js
generated
vendored
@@ -129387,6 +129387,7 @@ const core = __importStar(__nccwpck_require__(37484));
|
||||
const exec = __importStar(__nccwpck_require__(95236));
|
||||
const restore_cache_1 = __nccwpck_require__(95391);
|
||||
const download_version_1 = __nccwpck_require__(28255);
|
||||
const constants_1 = __nccwpck_require__(56156);
|
||||
const inputs_1 = __nccwpck_require__(9612);
|
||||
const platforms_1 = __nccwpck_require__(98361);
|
||||
const resolve_1 = __nccwpck_require__(36772);
|
||||
@@ -129473,18 +129474,33 @@ async function determineVersion(manifestFile) {
|
||||
}
|
||||
function addUvToPathAndOutput(cachedPath) {
|
||||
core.setOutput("uv-path", `${cachedPath}${path.sep}uv`);
|
||||
core.saveState(constants_1.STATE_UV_PATH, `${cachedPath}${path.sep}uv`);
|
||||
core.setOutput("uvx-path", `${cachedPath}${path.sep}uvx`);
|
||||
core.addPath(cachedPath);
|
||||
core.info(`Added ${cachedPath} to the path`);
|
||||
if (process.env.UV_NO_MODIFY_PATH !== undefined) {
|
||||
core.info("UV_NO_MODIFY_PATH is set, not modifying PATH");
|
||||
}
|
||||
else {
|
||||
core.addPath(cachedPath);
|
||||
core.info(`Added ${cachedPath} to the path`);
|
||||
}
|
||||
}
|
||||
function addToolBinToPath() {
|
||||
if (inputs_1.toolBinDir !== undefined) {
|
||||
core.exportVariable("UV_TOOL_BIN_DIR", inputs_1.toolBinDir);
|
||||
core.info(`Set UV_TOOL_BIN_DIR to ${inputs_1.toolBinDir}`);
|
||||
core.addPath(inputs_1.toolBinDir);
|
||||
core.info(`Added ${inputs_1.toolBinDir} to the path`);
|
||||
if (process.env.UV_NO_MODIFY_PATH !== undefined) {
|
||||
core.info(`UV_NO_MODIFY_PATH is set, not adding ${inputs_1.toolBinDir} to path`);
|
||||
}
|
||||
else {
|
||||
core.addPath(inputs_1.toolBinDir);
|
||||
core.info(`Added ${inputs_1.toolBinDir} to the path`);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (process.env.UV_NO_MODIFY_PATH !== undefined) {
|
||||
core.info("UV_NO_MODIFY_PATH is set, not adding user local bin to path");
|
||||
return;
|
||||
}
|
||||
if (process.env.XDG_BIN_HOME !== undefined) {
|
||||
core.addPath(process.env.XDG_BIN_HOME);
|
||||
core.info(`Added ${process.env.XDG_BIN_HOME} to the path`);
|
||||
@@ -129513,6 +129529,9 @@ function setupPython() {
|
||||
}
|
||||
async function activateEnvironment() {
|
||||
if (inputs_1.activateEnvironment) {
|
||||
if (process.env.UV_NO_MODIFY_PATH !== undefined) {
|
||||
throw new Error("UV_NO_MODIFY_PATH and activate-environment cannot be used together.");
|
||||
}
|
||||
const execArgs = ["venv", ".venv", "--directory", inputs_1.workingDirectory];
|
||||
core.info("Activating python venv...");
|
||||
await exec.exec("uv", execArgs);
|
||||
@@ -129545,10 +129564,11 @@ run();
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.TOOL_CACHE_NAME = exports.OWNER = exports.REPO = void 0;
|
||||
exports.STATE_UV_PATH = exports.TOOL_CACHE_NAME = exports.OWNER = exports.REPO = void 0;
|
||||
exports.REPO = "uv";
|
||||
exports.OWNER = "astral-sh";
|
||||
exports.TOOL_CACHE_NAME = "uv";
|
||||
exports.STATE_UV_PATH = "uv-path";
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
Reference in New Issue
Block a user