Skip to content

Commit bf8ddae

Browse files
committed
erts: by default cwd should be last in the path
1 parent 8cc569c commit bf8ddae

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

erts/preloaded/src/init.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1160,7 +1160,7 @@ sleep(T) -> receive after T -> ok end.
11601160

11611161
start_prim_loader(Init, Path0, {Pa,Pz}) ->
11621162
Path = case Path0 of
1163-
false -> Pa ++ ["."|Pz];
1163+
false -> Pa ++ Pz ++ ["."];
11641164
_ -> Path0
11651165
end,
11661166
case erl_prim_loader:start() of

lib/kernel/src/code_server.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ init(Ref, Parent, [Root,Mode]) ->
107107
{ok,Dirs} = erl_prim_loader:list_dir(LibDir),
108108
Paths = make_path(LibDir, Dirs),
109109
UserLibPaths = get_user_lib_dirs(),
110-
["."] ++ UserLibPaths ++ Paths;
110+
UserLibPaths ++ Paths ++ ["."];
111111
_ ->
112112
[]
113113
end,

system/doc/general_info/upcoming_incompatibilities.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,3 +267,8 @@ occurrences of `maybe` without quotes.
267267
268268
As of OTP 29, the `cprof` and `eprof` will be removed in favor of `m:tprof`
269269
added in OTP 27.
270+
271+
### CWD or '.' is now placed last in code path
272+
273+
As of OTP 29, the CWD is added last instead of first in code path. It can be added first with
274+
-pa '.' if needed.

0 commit comments

Comments
 (0)