Skip to content

Commit

Permalink
fix: venv symlink already exist when installing again into venv (#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
nichmor authored Feb 9, 2024
1 parent 1583985 commit 47e370b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/rattler_installs_packages/src/python_env/venv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,9 @@ prompt = {}"#,

for bin_name in python_bins.into_iter() {
let venv_python_bin = venv_bin.join(bin_name);
if !venv_python_bin.exists() && venv_exe_path != venv_python_bin {
if (!venv_python_bin.exists() && !venv_python_bin.is_symlink())
&& venv_exe_path != venv_python_bin
{
copy_file(venv_exe_path, &venv_python_bin)?;
}
}
Expand Down

0 comments on commit 47e370b

Please sign in to comment.