mirror of
https://github.com/astral-sh/setup-uv.git
synced 2026-02-21 08:11:46 +00:00
fix: use --clear to create venv
This commit is contained in:
parent
b6b8e2cd6a
commit
5f8bfe19d8
2 changed files with 14 additions and 2 deletions
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.");
|
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}...`);
|
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`;
|
let venvBinPath = `${inputs_1.venvPath}${path.sep}bin`;
|
||||||
if (process.platform === "win32") {
|
if (process.platform === "win32") {
|
||||||
venvBinPath = `${inputs_1.venvPath}${path.sep}Scripts`;
|
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}...`);
|
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`;
|
let venvBinPath = `${venvPath}${path.sep}bin`;
|
||||||
if (process.platform === "win32") {
|
if (process.platform === "win32") {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue