mirror of
https://github.com/astral-sh/setup-uv.git
synced 2026-03-10 08:42:21 +00:00
fix: use --clear to create venv (#761)
Fixes: https://github.com/astral-sh/setup-uv/issues/758
This commit is contained in:
committed by
GitHub
parent
b6b8e2cd6a
commit
78cebeceac
8
dist/setup/index.js
generated
vendored
8
dist/setup/index.js
generated
vendored
@@ -96569,7 +96569,13 @@ async function activateEnvironment() {
|
||||
throw new Error("UV_NO_MODIFY_PATH and activate-environment cannot be used together.");
|
||||
}
|
||||
core.info(`Creating and activating python venv at ${inputs_1.venvPath}...`);
|
||||
await exec.exec("uv", ["venv", inputs_1.venvPath, "--directory", inputs_1.workingDirectory]);
|
||||
await exec.exec("uv", [
|
||||
"venv",
|
||||
inputs_1.venvPath,
|
||||
"--directory",
|
||||
inputs_1.workingDirectory,
|
||||
"--clear",
|
||||
]);
|
||||
let venvBinPath = `${inputs_1.venvPath}${path.sep}bin`;
|
||||
if (process.platform === "win32") {
|
||||
venvBinPath = `${inputs_1.venvPath}${path.sep}Scripts`;
|
||||
|
||||
@@ -272,7 +272,13 @@ async function activateEnvironment(): Promise<void> {
|
||||
}
|
||||
|
||||
core.info(`Creating and activating python venv at ${venvPath}...`);
|
||||
await exec.exec("uv", ["venv", venvPath, "--directory", workingDirectory]);
|
||||
await exec.exec("uv", [
|
||||
"venv",
|
||||
venvPath,
|
||||
"--directory",
|
||||
workingDirectory,
|
||||
"--clear",
|
||||
]);
|
||||
|
||||
let venvBinPath = `${venvPath}${path.sep}bin`;
|
||||
if (process.platform === "win32") {
|
||||
|
||||
Reference in New Issue
Block a user