File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -242,23 +242,31 @@ String FindHaxelib(String inLib)
242242 printf ( haxepath.length ? " Found local .haxelib\n " : " No local .haxelib\n " );
243243 #endif
244244
245+ if (haxepath.length ==0 )
246+ {
247+ haxepath = GetEnv (" HAXELIB_PATH" );
248+ if (loadDebug)
249+ printf (" HAXELIB_PATH env:%s\n " , haxepath.__s );
250+ }
251+
252+ if (haxepath.length ==0 )
253+ {
254+ #ifdef _WIN32
255+ String home = GetEnv (" HOMEDRIVE" ) + GetEnv (" HOMEPATH" ) + HX_CSTRING (" /.haxelib" );
256+ #else
257+ String home = GetEnv (" HOME" ) + HX_CSTRING (" /.haxelib" );
258+ #endif
259+ haxepath = GetFileContents (home);
260+ if (loadDebug)
261+ printf (" HAXEPATH home:%s\n " , haxepath.__s );
262+ }
263+
245264 if (haxepath.length ==0 )
246265 {
247266 haxepath = GetEnv (" HAXEPATH" );
248267 if (loadDebug)
249268 printf (" HAXEPATH env:%s\n " , haxepath.__s );
250- if (haxepath.length ==0 )
251- {
252- #ifdef _WIN32
253- String home = GetEnv (" HOMEDRIVE" ) + GetEnv (" HOMEPATH" ) + HX_CSTRING (" /.haxelib" );
254- #else
255- String home = GetEnv (" HOME" ) + HX_CSTRING (" /.haxelib" );
256- #endif
257- haxepath = GetFileContents (home);
258- if (loadDebug)
259- printf (" HAXEPATH home:%s\n " , haxepath.__s );
260- }
261- else
269+ if (haxepath.length >0 )
262270 {
263271 haxepath += HX_CSTRING (" /lib" );
264272 }
You can’t perform that action at this time.
0 commit comments