mirror of
https://github.com/astral-sh/setup-uv.git
synced 2025-11-05 17:36:49 +00:00
committed by
GitHub
parent
bd1f875aba
commit
d18bcc753a
@@ -19,6 +19,7 @@ import {
|
||||
githubToken,
|
||||
ignoreEmptyWorkdir,
|
||||
manifestFile,
|
||||
pythonDir,
|
||||
pythonVersion,
|
||||
toolBinDir,
|
||||
toolDir,
|
||||
@@ -51,6 +52,7 @@ async function run(): Promise<void> {
|
||||
addToolBinToPath();
|
||||
addUvToPathAndOutput(setupResult.uvDir);
|
||||
setToolDir();
|
||||
addPythonDirToPath();
|
||||
setupPython();
|
||||
await activateEnvironment();
|
||||
addMatchers();
|
||||
@@ -194,6 +196,17 @@ function setToolDir(): void {
|
||||
}
|
||||
}
|
||||
|
||||
function addPythonDirToPath(): void {
|
||||
core.exportVariable("UV_PYTHON_INSTALL_DIR", pythonDir);
|
||||
core.info(`Set UV_PYTHON_INSTALL_DIR to ${pythonDir}`);
|
||||
if (process.env.UV_NO_MODIFY_PATH !== undefined) {
|
||||
core.info("UV_NO_MODIFY_PATH is set, not adding python dir to path");
|
||||
} else {
|
||||
core.addPath(pythonDir);
|
||||
core.info(`Added ${pythonDir} to the path`);
|
||||
}
|
||||
}
|
||||
|
||||
function setupPython(): void {
|
||||
if (pythonVersion !== "") {
|
||||
core.exportVariable("UV_PYTHON", pythonVersion);
|
||||
|
||||
Reference in New Issue
Block a user