technomancy/leiningen

lein help non-existant-task should exit with non-zero error code

cap10morgan opened this issue · 1 comments

You all might have good reasons for not doing this, but just in case I thought I'd ask:

Would it make sense to have lein exit with a non-zero error code when you run lein help non-existant-subcommand-or-task?

I ask because I'm working on enabling lein to be the ENTRYPOINT of the official clojure Docker images (instead of the CMD) but I also have to detect when the user is trying to invoke a different executable in the image directly and override that (due to Docker Official Image policy). The usual approach they take is to see if asking for help on that subcommand exits successfully or not (to detect if it's something that should be exec'd directly instead of passed to the ENTRYPOINT). But lein help currently appears to exit successfully (with Task: 'whatever' not found in this case) no matter what.

No, I agree this would be a good idea. Happy to take a patch for this, or I could get to it at some unspecified point down the line. =)