File tree Expand file tree Collapse file tree 3 files changed +14
-2
lines changed
Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -216,6 +216,7 @@ fn get_conda_conda_rc_from_path(conda_rc: &PathBuf) -> Option<Condarc> {
216216 if env_dirs. is_empty ( ) && files. is_empty ( ) {
217217 None
218218 } else {
219+ trace ! ( "conda_rc: {:?} with env_dirs {:?}" , conda_rc, env_dirs) ;
219220 Some ( Condarc { env_dirs, files } )
220221 }
221222}
Original file line number Diff line number Diff line change @@ -75,6 +75,7 @@ fn get_conda_environment_paths_from_conda_rc(env_vars: &EnvVariables) -> Vec<Pat
7575 let mut env_dirs = vec ! [ ] ;
7676 for rc_file_dir in get_conda_rc_search_paths ( env_vars) {
7777 if !rc_file_dir. exists ( ) {
78+ trace ! ( ".condarc not found ({:?})" , rc_file_dir) ;
7879 continue ;
7980 }
8081
@@ -111,7 +112,7 @@ fn get_conda_environment_paths_from_conda_rc(env_vars: &EnvVariables) -> Vec<Pat
111112 ) ;
112113 env_dirs. append ( & mut conda_rc. env_dirs . clone ( ) ) ;
113114 } else {
114- trace ! ( "No Conda environments in .condarc" ) ;
115+ trace ! ( "No Conda environments in .condarc {:?}" , env_dirs ) ;
115116 }
116117 env_dirs
117118}
Original file line number Diff line number Diff line change @@ -133,8 +133,18 @@ impl Environment for EnvironmentApi {
133133 }
134134}
135135
136+ #[ cfg( windows) ]
137+ fn get_user_home ( ) -> Option < PathBuf > {
138+ let home = env:: var ( "USERPROFILE" ) . or_else ( |_| env:: var ( "HOME" ) ) ;
139+ match home {
140+ Ok ( home) => Some ( norm_case ( PathBuf :: from ( home) ) ) ,
141+ Err ( _) => None ,
142+ }
143+ }
144+
145+ #[ cfg( unix) ]
136146fn get_user_home ( ) -> Option < PathBuf > {
137- let home = env:: var ( "HOME" ) . or_else ( |_| env :: var ( "USERPROFILE" ) ) ;
147+ let home = env:: var ( "HOME" ) ;
138148 match home {
139149 Ok ( home) => Some ( norm_case ( PathBuf :: from ( home) ) ) ,
140150 Err ( _) => None ,
You can’t perform that action at this time.
0 commit comments