Skip to content

Commit

Permalink
when using --prefix, just lock the prefix dir
Browse files Browse the repository at this point in the history
  • Loading branch information
ericmarkmartin committed Jun 25, 2024
1 parent ddacede commit 3234fd6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/uv-toolchain/src/environment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ impl PythonEnvironment {
if let Some(target) = self.0.interpreter.target() {
// If we're installing into a `--target`, use a target-specific lock file.
LockedFile::acquire(target.root().join(".lock"), target.root().user_display())
} else if let Some(prefix) = self.0.interpreter.prefix() {
LockedFile::acquire(prefix.root().join(".lock"), prefix.root().user_display())
} else if self.0.interpreter.is_virtualenv() {
// If the environment a virtualenv, use a virtualenv-specific lock file.
LockedFile::acquire(self.0.root.join(".lock"), self.0.root.user_display())
Expand Down

0 comments on commit 3234fd6

Please sign in to comment.