Set output venv when activate-environment is used (#627)

Closes: #622
This commit is contained in:
Kevin Stillhammer
2025-10-11 15:17:25 +02:00
committed by GitHub
parent 1a91c3851d
commit bd1f875aba
4 changed files with 26 additions and 9 deletions

8
dist/setup/index.js generated vendored
View File

@@ -129661,12 +129661,14 @@ async function activateEnvironment() {
const execArgs = ["venv", ".venv", "--directory", inputs_1.workingDirectory];
core.info("Activating python venv...");
await exec.exec("uv", execArgs);
let venvBinPath = `${inputs_1.workingDirectory}${path.sep}.venv${path.sep}bin`;
const venvPath = path.resolve(`${inputs_1.workingDirectory}${path.sep}.venv`);
let venvBinPath = `${venvPath}${path.sep}bin`;
if (process.platform === "win32") {
venvBinPath = `${inputs_1.workingDirectory}${path.sep}.venv${path.sep}Scripts`;
venvBinPath = `${venvPath}${path.sep}Scripts`;
}
core.addPath(path.resolve(venvBinPath));
core.exportVariable("VIRTUAL_ENV", path.resolve(`${inputs_1.workingDirectory}${path.sep}.venv`));
core.exportVariable("VIRTUAL_ENV", venvPath);
core.setOutput("venv", venvPath);
}
}
function setCacheDir() {