File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
pet-global-virtualenvs/src Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ fn get_global_virtualenv_dirs(
5656}
5757
5858pub fn list_global_virtual_envs_paths (
59+ virtual_env_env_var : Option < String > ,
5960 work_on_home_env_var : Option < String > ,
6061 xdg_data_home : Option < String > ,
6162 user_home : Option < PathBuf > ,
@@ -73,6 +74,13 @@ pub fn list_global_virtual_envs_paths(
7374 }
7475 }
7576
77+ if let Some ( virtual_env) = virtual_env_env_var {
78+ let virtual_env = norm_case ( expand_path ( PathBuf :: from ( virtual_env) ) ) ;
79+ if virtual_env. exists ( ) {
80+ python_envs. push ( virtual_env) ;
81+ }
82+ }
83+
7684 python_envs. sort ( ) ;
7785 python_envs. dedup ( ) ;
7886
Original file line number Diff line number Diff line change @@ -160,6 +160,7 @@ pub fn find_and_report_envs(
160160
161161 let search_paths: Vec < PathBuf > = [
162162 list_global_virtual_envs_paths (
163+ environment. get_env_var ( "VIRTUAL_ENV" . into ( ) ) ,
163164 environment. get_env_var ( "WORKON_HOME" . into ( ) ) ,
164165 environment. get_env_var ( "XDG_DATA_HOME" . into ( ) ) ,
165166 environment. get_user_home ( ) ,
You can’t perform that action at this time.
0 commit comments