new inputs activate-environment and working-directory (#381)

venv activation was implicit when python-version was supplied. This now
only happens when activate-environment is true. working-directory
controls where we work and thus also where the .venv will be created

Closes: #351
Closes: #271
Closes: #251
Closes: #211
This commit is contained in:
Kevin Stillhammer
2025-04-24 15:17:35 +02:00
committed by GitHub
parent aa1290542e
commit ec4c691628
9 changed files with 203 additions and 179 deletions

View File

@ -5,6 +5,7 @@ import {
cacheLocalPath,
cacheSuffix,
pythonVersion as pythonVersionInput,
workingDirectory,
} from "../utils/inputs";
import { getArch, getPlatform } from "../utils/platforms";
import { hashFiles } from "../hash/hash-files";
@ -73,7 +74,7 @@ async function getPythonVersion(): Promise<string> {
};
try {
const execArgs = ["python", "find"];
const execArgs = ["python", "find", "--directory", workingDirectory];
await exec.exec("uv", execArgs, options);
const pythonPath = output.trim();