-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GLI swallows standard out #146
Comments
This had my head scratching, but it's because the If you change To make matters worse, the app exits with zero, which I can see as being wrong. I can think of a few ways to make this situation not so confusing:
|
I'd thought of If it's a precondition, I think the semantics you have now make sense, but the API needs better explanation. The first and third options seem right in this case. If it's not a precondition, I don't think it should worry about the return value of the block. |
Fixed and/or better in 2.6.0 |
This still tripped me up in 2.6.0. pre do |global_options,command,options,args|
puts 'hi'
# true
end This results in a edit: Sorry on further reading of the above, seems like this is (as you decided) expected behavior. I think that the docs at http://davetron5000.github.io/gli/ could still better explain this behavior. |
Yeah, that's because Dave Buy My Book: http://www.awesomecommandlineapps.com On Wed, Jun 26, 2013 at 11:49 AM, Simon Holroyd notifications@git.luolix.topwrote:
|
I think the behavior is fine as is, but yea either an exception or a just a heads up in the docs to those of us who are gonna assume we can send output in |
Make sense. Do you think a more strongly-worded comment in the generated Dave Buy My Book: http://www.awesomecommandlineapps.com On Wed, Jun 26, 2013 at 12:25 PM, Simon Holroyd notifications@git.luolix.topwrote:
|
yea, i think that sounds great. The rdoc wasn't the first place I looked, for sure. |
This improvement is in 2.6.2 |
This simple GLI program doesn't produce any output:
Invoking it:
$ bundle exec bin/sifter projects $ rbenv version 1.9.3-p327-perf (set by /Users/adam/.rbenv/version)
I've had this problem a couple times, only to find it mysteriously resolve itself later. I think it has to do with performing IO inside an action definition.
The text was updated successfully, but these errors were encountered: