diff options
author | Mikael Pettersson <mikpelinux@gmail.com> | 2020-09-12 18:31:49 +0200 |
---|---|---|
committer | Mikael Pettersson <mikpelinux@gmail.com> | 2020-09-12 18:38:28 +0200 |
commit | 9f48ebbc0454cf60f9a9808802f755c7d42f9549 (patch) | |
tree | bd214a24cc6fd0d62eb541e745cde67fdb45a2cf | |
parent | 0d67f92d35af61a7a8da504bdd9e2212ac9315ad (diff) | |
download | erlang-9f48ebbc0454cf60f9a9808802f755c7d42f9549.tar.gz |
escript: direct all io:put_chars/1 calls to standard_error
they are all error or warning messages
-rw-r--r-- | lib/stdlib/src/escript.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/stdlib/src/escript.erl b/lib/stdlib/src/escript.erl index 50f774c5fc..6d7793a8cd 100644 --- a/lib/stdlib/src/escript.erl +++ b/lib/stdlib/src/escript.erl @@ -814,7 +814,7 @@ report_warnings(Ws0) -> ({F,Eds}) -> format_message(F, Eds) end, Ws0), Ws = ordsets:from_list(Ws1), - lists:foreach(fun({_,Str}) -> io:put_chars(Str) end, Ws). + lists:foreach(fun({_,Str}) -> io:put_chars(standard_error, Str) end, Ws). format_message(F, [{Line,Mod,E}|Es]) -> M = {{F,Line},io_lib:format("~ts:~w: Warning: ~ts\n", [F,Line,Mod:format_error(E)])}, @@ -897,7 +897,7 @@ encoding() -> put_chars(String) -> try - io:put_chars(String) + io:put_chars(standard_error, String) catch _:_ -> erlang:display(lists:flatten(String)) |