mirror of https://github.com/astral-sh/uv
(f)lock during `uv run` (#14153)
This is very similar to the locking added for `uv sync`, `uv add`, and `uv remove` in https://github.com/astral-sh/uv/pull/13869. Improving our (f)locking in general is tracked in https://github.com/astral-sh/uv/issues/13883.
This commit is contained in:
parent
1dbe750452
commit
0133bcc8ca
|
|
@ -240,6 +240,8 @@ hint: If you are running a script with `{}` in the shebang, you may need to incl
|
||||||
.await?
|
.await?
|
||||||
.into_environment()?;
|
.into_environment()?;
|
||||||
|
|
||||||
|
let _lock = environment.lock().await?;
|
||||||
|
|
||||||
// Determine the lock mode.
|
// Determine the lock mode.
|
||||||
let mode = if frozen {
|
let mode = if frozen {
|
||||||
LockMode::Frozen
|
LockMode::Frozen
|
||||||
|
|
@ -382,6 +384,8 @@ hint: If you are running a script with `{}` in the shebang, you may need to incl
|
||||||
)
|
)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
let _lock = environment.lock().await?;
|
||||||
|
|
||||||
match update_environment(
|
match update_environment(
|
||||||
environment,
|
environment,
|
||||||
spec,
|
spec,
|
||||||
|
|
@ -694,6 +698,8 @@ hint: If you are running a script with `{}` in the shebang, you may need to incl
|
||||||
.map(|lock| (lock, project.workspace().install_path().to_owned()));
|
.map(|lock| (lock, project.workspace().install_path().to_owned()));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
let _lock = venv.lock().await?;
|
||||||
|
|
||||||
// Determine the lock mode.
|
// Determine the lock mode.
|
||||||
let mode = if frozen {
|
let mode = if frozen {
|
||||||
LockMode::Frozen
|
LockMode::Frozen
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue