We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 651da7b commit e0f41f1Copy full SHA for e0f41f1
1 file changed
bin/common/.local/bin/pyswitch
@@ -16,7 +16,11 @@ venv_src="$VENV_INSTALL_DIR/global-$version"
16
venv_dst="$HOME/.venv"
17
18
# Remove the global venv first since `uv python find` would match it.
19
-rm -f "$venv_dst"
+if [ -L "$venv_dst" ]; then
20
+ rm -f "$venv_dst"
21
+elif [ -d "$venv_dst" ]; then
22
+ rm -rf "$venv_dst"
23
+fi
24
bin="$(uv python find "$version")"
25
26
# Create a venv for this version and symlink it into HOME so that uv can find it.
0 commit comments