Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

errors/warnings should be printed to stderr, not stdout #826

Closed
marvinthepa opened this Issue Oct 24, 2012 · 4 comments

Comments

4 participants

The infamous: (see #610)

Could not find artifact org.clojure:clojure:pom:1.+ in central (http://repo1.maven.org/maven2)
Could not find artifact org.clojure:clojure:pom:1.+ in clojars (https://clojars.org/repo/)

Is printed to stdout, not stderr. This makes "lein classpath" unusuable in the common way that it would be used in a shell script, namely

java -cp $(lein classpath) ...
java -cp `lein classpath`

e.g.

$ lein classpath 2> /dev/null
Could not find artifact org.clojure:clojure:pom:1.+ in central (http://repo1.maven.org/maven2)
Could not find artifact org.clojure:clojure:pom:1.+ in clojars (https://clojars.org/repo/)
<and the real classpath follows>
Owner

technomancy commented Oct 26, 2012

Happy to take a patch for this; otherwise this probably won't make it into 2.0.0.

Contributor

benjaminsavoy commented Feb 17, 2013

Issued a pull request for this one @ #1011

There's a merged pull request but I'm unfamiliar with protocol. Does the issue remain open until a new release including the fix or should this be closed?

Owner

technomancy commented May 14, 2013

The patch got merged but had to be reverted because it included a bunch of breaking changes as well as undesirably verbose output.

Another patch that just switched to stderr without moving any vars around or changing the format of the output would be great.

@cddr cddr pushed a commit to cddr/leiningen that referenced this issue Apr 19, 2014

Andy Chambers Fixes #826; Redirect info messages to *err*
I decided to leave some messages alone. Specifically

 * messages which look like stacktraces
 * messages which instruct the user to take some sort of action

Arguably the stacktraces should go to stderr but I thought I'd leave
those open for discussion. Any others that remain probably represent
errors on my part.
584f966

@cddr cddr pushed a commit to cddr/leiningen that referenced this issue Apr 19, 2014

Andy Chambers Fixes #826; Redirect info messages to *err*
I decided to leave some messages alone. Specifically

 * messages which look like stacktraces
 * messages which instruct the user to take some sort of action

Arguably the stacktraces should go to stderr but I thought I'd leave
those open for discussion. Any others that remain represent errors on
my part.
c6d1a43

@cddr cddr pushed a commit to cddr/leiningen that referenced this issue Apr 19, 2014

Andy Chambers Fixes #826; Redirect info messages to *err*
I decided to leave some messages alone. Specifically

 * messages which look like stacktraces
 * messages which instruct the user to take some sort of action

Arguably the stacktraces should go to stderr but I thought I'd leave
those open for discussion. Any others that remain represent errors on
my part.
4cef546

@cddr cddr pushed a commit to cddr/leiningen that referenced this issue Apr 19, 2014

Andy Chambers Fixes #826; Redirect info messages to *err*
I decided to leave some messages alone. Specifically

 * messages which look like stacktraces
 * messages which instruct the user to take some sort of action

Arguably the stacktraces should go to stderr but I thought I'd leave
those open for discussion. Any others that remain represent errors on
my part.
9490aa2

@cddr cddr pushed a commit to cddr/leiningen that referenced this issue Apr 19, 2014

Andy Chambers Fixes #826; Redirect info messages to *err*
I decided to leave some messages alone. Specifically

 * messages which look like stacktraces
 * messages which instruct the user to take some sort of action

Arguably the stacktraces should go to stderr but I thought I'd leave
those open for discussion. Any others that remain represent errors on
my part.
f0aaa04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment