Add input no-project in combination with activate-environment (#856)

Closes: #854
This commit is contained in:
Kevin Stillhammer
2026-04-16 15:48:02 +02:00
committed by GitHub
parent 7dd591db95
commit b3e97d2ba1
8 changed files with 71 additions and 4 deletions

2
dist/save-cache/index.cjs generated vendored
View File

@@ -62968,6 +62968,7 @@ function loadInputs() {
const versionFile = getVersionFile(workingDirectory);
const pythonVersion = getInput("python-version");
const activateEnvironment = getBooleanInput("activate-environment");
const noProject = getBooleanInput("no-project");
const venvPath = getVenvPath(workingDirectory, activateEnvironment);
const checksum = getInput("checksum");
const enableCache = getEnableCache();
@@ -63004,6 +63005,7 @@ function loadInputs() {
ignoreEmptyWorkdir,
ignoreNothingToCache,
manifestFile,
noProject,
pruneCache: pruneCache2,
pythonDir,
pythonVersion,

10
dist/setup/index.cjs generated vendored
View File

@@ -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`;