Skip to content

Commit e6cb3c7

Browse files
authored
Merge pull request #8 from SangwoonYun/fix/find-venv
fix: Handle the find command
2 parents 3fe52a2 + 7c1d518 commit e6cb3c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

zsh-auto-venv.plugin.zsh

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ find_venv() {
6565
# Search for 'bin/activate' in current and all parent directories
6666
while [[ "$dir" != "" ]]; do
6767
# Look for 'bin/activate' in all subdirectories of the current directory
68-
found_venvs=($(find "$dir" -maxdepth 3 -type f -name "activate" -path "*/bin/activate"))
68+
found_venvs=($(find "$dir" -maxdepth 3 -type f -name "activate" -path "*/bin/activate" 2>/dev/null))
6969
if [[ "${#found_venvs[@]}" -gt 0 ]]; then
7070
echo $found_venvs # Return the first found virtual environment path
7171
return

0 commit comments

Comments
 (0)