1414end
1515
1616function adjust_ENV! (env:: Dict , PATH:: String , LIBPATH:: String , adjust_PATH:: Bool , adjust_LIBPATH:: Bool )
17- if adjust_PATH
18- if ! isempty (get (env, " PATH" , " " ))
19- env[" PATH" ] = string (PATH, pathsep, env[" PATH" ])
20- else
21- env[" PATH" ] = PATH
22- end
23- end
2417 if adjust_LIBPATH
2518 LIBPATH_base = get (env, LIBPATH_env, expanduser (LIBPATH_default))
2619 if ! isempty (LIBPATH_base)
@@ -29,6 +22,15 @@ function adjust_ENV!(env::Dict, PATH::String, LIBPATH::String, adjust_PATH::Bool
2922 env[LIBPATH_env] = LIBPATH
3023 end
3124 end
25+ if adjust_PATH && (LIBPATH_env != " PATH" || ! adjust_LIBPATH)
26+ if adjust_PATH
27+ if ! isempty (get (env, " PATH" , " " ))
28+ env[" PATH" ] = string (PATH, pathsep, env[" PATH" ])
29+ else
30+ env[" PATH" ] = PATH
31+ end
32+ end
33+ end
3234 return env
3335end
3436
@@ -83,6 +85,10 @@ Return the library paths that e.g. libjulia and such are stored in.
8385function get_julia_libpaths ()
8486 if isempty (JULIA_LIBDIRS)
8587 append! (JULIA_LIBDIRS, [joinpath (Sys. BINDIR, Base. LIBDIR, " julia" ), joinpath (Sys. BINDIR, Base. LIBDIR)])
88+ # Windows needs to see the BINDIR as well
89+ @static if Sys. iswindows ()
90+ push! (JULIA_LIBDIRS, Sys. BINDIR)
91+ end
8692 end
8793 return JULIA_LIBDIRS
8894end
0 commit comments