Skip to content

Commit 07ecf52

Browse files
committed
Merge branch 'maint'
2 parents cfa0930 + b408eb2 commit 07ecf52

File tree

12 files changed

+41
-9
lines changed

12 files changed

+41
-9
lines changed

erts/etc/common/dialyzer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ int main(int argc, char** argv)
252252
}
253253

254254
PUSH("+B");
255-
PUSH2("-boot", "no_dot_erlang");
255+
PUSH2("-boot", "$ROOT/no_dot_erlang");
256256
PUSH3("-run", "dialyzer", "plain_cl");
257257
PUSH("-extra");
258258

erts/etc/common/erlc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -974,7 +974,7 @@ start_compile_server(char* node_name, char** argv)
974974
eargv[eargc++] = *argv++;
975975
}
976976
}
977-
PUSH2("-boot", "no_dot_erlang");
977+
PUSH2("-boot", "$ROOT/no_dot_erlang");
978978
PUSH2("-sname", node_name);
979979
PUSH2("-setcookie", "erlc_compile_server_cookie");
980980
PUSH("-hidden");

erts/etc/common/escript.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ main(int argc, char** argv)
513513

514514
PUSH("+B");
515515
PUSH("-noshell");
516-
PUSH2("-boot", "no_dot_erlang");
516+
PUSH2("-boot", "$ROOT/no_dot_erlang");
517517

518518
/*
519519
* Read options from the %%! row in the script and add them as args

erts/etc/common/typer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ main(int argc, char** argv)
179179
}
180180

181181
PUSH("+B");
182-
PUSH2("-boot", "no_dot_erlang");
182+
PUSH2("-boot", "$ROOT/no_dot_erlang");
183183
PUSH3("-run", "typer", "start");
184184
PUSH("-extra");
185185

erts/preloaded/ebin/init.beam

128 Bytes
Binary file not shown.
12 Bytes
Binary file not shown.

erts/preloaded/ebin/prim_zip.beam

24 Bytes
Binary file not shown.

erts/preloaded/src/init.erl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1259,7 +1259,10 @@ path_flags(Flags) ->
12591259
{bs2ss(Pa),bs2ss(Pz)}.
12601260

12611261
get_boot(BootFile0,Root) ->
1262-
BootFile = BootFile0 ++ ".boot",
1262+
BootFile = case BootFile0 of
1263+
"$ROOT/" ++ BootFile1 -> Root ++ "/bin/" ++ BootFile1 ++ ".boot";
1264+
_ -> BootFile0 ++ ".boot"
1265+
end,
12631266

12641267
case get_boot(BootFile) of
12651268
{ok, CmdList} ->

lib/kernel/src/code_server.erl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -843,6 +843,9 @@ insert_name(Name, Dir, Db) ->
843843
AppDir = del_ebin(Dir),
844844
do_insert_name(Name, AppDir, Db).
845845

846+
do_insert_name(".", _, _) ->
847+
%% "." is most likely not an archive, avoid looking for subdirs
848+
true;
846849
do_insert_name(Name, AppDir, Db) ->
847850
{Base, SubDirs} = archive_subdirs(AppDir),
848851
ets:insert(Db, {Name, AppDir, Base, SubDirs}),

lib/kernel/src/prim_tty.erl

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,8 @@ handle_request(State = #state{ unicode = U }, {putc, Binary}) ->
831831
end,
832832
Moves = move_cursor(State, State#state.cols, ToCol)
833833
end,
834-
Binary1 = if PutcBufferState#state.putc_buffer =:= <<>> ->
834+
BinaryNoAnsi = remove_ansi_sequences(PutcBufferState#state.putc_buffer),
835+
Binary1 = if BinaryNoAnsi =:= <<>> ->
835836
%% Binary has a real new line at the end
836837
Binary;
837838
true ->
@@ -1014,6 +1015,19 @@ handle_request(State, Req) ->
10141015
erlang:display({unhandled_request, Req}),
10151016
{"", State}.
10161017

1018+
remove_ansi_sequences(<<27,Bin/binary>>) ->
1019+
Bins = binary:split(Bin, <<27>>, [global]),
1020+
remove_ansi_sequences1([<<27,B/binary>> || B <- Bins],[]);
1021+
remove_ansi_sequences(Bin) ->
1022+
[Acc|Bins] = binary:split(Bin, <<27>>, [global]),
1023+
remove_ansi_sequences1([<<27,B/binary>> || B <- Bins],[Acc]).
1024+
remove_ansi_sequences1([Bin|Bins], Acc) ->
1025+
{match, [{0, N}]} = re:run(Bin, ansi_regexp()),
1026+
<<_:N/binary, AnsiRest/binary>> = Bin,
1027+
remove_ansi_sequences1(Bins, [AnsiRest|Acc]);
1028+
remove_ansi_sequences1([], Acc) ->
1029+
list_to_binary(lists:reverse(Acc)).
1030+
10171031
last_or_empty([]) -> [];
10181032
last_or_empty([H]) -> H;
10191033
last_or_empty(L) -> [H|_] = lists:reverse(L), H.

0 commit comments

Comments
 (0)