mirror of
https://github.com/astral-sh/setup-uv.git
synced 2025-09-21 11:27:06 +00:00
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:
committed by
GitHub
parent
aa1290542e
commit
ec4c691628
3
src/cache/restore-cache.ts
vendored
3
src/cache/restore-cache.ts
vendored
@ -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();
|
||||
|
||||
|
Reference in New Issue
Block a user