You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hex.Shell.warn/1 wrote to stdout via Mix.shell().info/1, so warnings
like the expired-authentication notice or the stale mix.lock version
warning polluted machine-readable stdout output such as
`mix hex.outdated --json`. Route warn/1 through Mix.shell().error/1,
which prints to stderr, keeping the yellow warning color.
Warning-colored lines that are part of a command's regular stdout
output (the retirement reason in the `mix deps.get` dependency
listing and the retirement notice in `mix hex.info`) stay on stdout
and are now printed as yellow-formatted info lines instead.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,10 @@
2
2
3
3
## v2.5.2-dev
4
4
5
+
### Enhancements
6
+
7
+
* Print warnings to standard error instead of standard output, keeping stdout clean for machine-readable output such as `mix hex.outdated --json`. Warning-colored lines that are part of a command's regular output, such as retirement notices in `mix hex.info` and the `mix deps.get` dependency listing, remain on standard output
@@ -63,7 +63,7 @@ defmodule Mix.Tasks.Hex.BuildTest do
63
63
File.write!("myfile.txt","hello")
64
64
Mix.Tasks.Hex.Build.run([])
65
65
66
-
assert_received{:mix_shell,:info,
66
+
assert_received{:mix_shell,:error,
67
67
[
68
68
"\e[33mThe following licenses are not recognized by SPDX:\n * CustomLicense\n\nValid license identifiers are available from https://spdx.org/licenses\e[0m"
69
69
]}
@@ -480,7 +480,7 @@ defmodule Mix.Tasks.Hex.BuildTest do
480
480
"\e[33mMix project configuration :organization belongs under the :package key, "<>
0 commit comments