mirror of
https://github.com/astral-sh/setup-uv.git
synced 2026-04-17 02:06:29 +00:00
Add input no-project in combination with activate-environment (#856)
Closes: #854
This commit is contained in:
committed by
GitHub
parent
7dd591db95
commit
b3e97d2ba1
10
dist/setup/index.cjs
generated
vendored
10
dist/setup/index.cjs
generated
vendored
@@ -96970,6 +96970,7 @@ function loadInputs() {
|
||||
const versionFile = getVersionFile(workingDirectory);
|
||||
const pythonVersion = getInput("python-version");
|
||||
const activateEnvironment2 = getBooleanInput("activate-environment");
|
||||
const noProject = getBooleanInput("no-project");
|
||||
const venvPath = getVenvPath(workingDirectory, activateEnvironment2);
|
||||
const checksum = getInput("checksum");
|
||||
const enableCache = getEnableCache();
|
||||
@@ -97006,6 +97007,7 @@ function loadInputs() {
|
||||
ignoreEmptyWorkdir,
|
||||
ignoreNothingToCache,
|
||||
manifestFile,
|
||||
noProject,
|
||||
pruneCache,
|
||||
pythonDir,
|
||||
pythonVersion,
|
||||
@@ -97385,13 +97387,17 @@ async function activateEnvironment(inputs) {
|
||||
);
|
||||
}
|
||||
info(`Creating and activating python venv at ${inputs.venvPath}...`);
|
||||
await exec("uv", [
|
||||
const venvArgs = [
|
||||
"venv",
|
||||
inputs.venvPath,
|
||||
"--directory",
|
||||
inputs.workingDirectory,
|
||||
"--clear"
|
||||
]);
|
||||
];
|
||||
if (inputs.noProject) {
|
||||
venvArgs.push("--no-project");
|
||||
}
|
||||
await exec("uv", venvArgs);
|
||||
let venvBinPath = `${inputs.venvPath}${path16.sep}bin`;
|
||||
if (process.platform === "win32") {
|
||||
venvBinPath = `${inputs.venvPath}${path16.sep}Scripts`;
|
||||
|
||||
Reference in New Issue
Block a user