rlishtaba / rubyripper

Automatically exported from code.google.com/p/rubyripper
0 stars 0 forks source link

rrip_cli --version : "fat" output #389

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. run rrip_cli --version at terminal.

What is the expected output? What do you see instead?
------------------------------------------------------------------------
$ rrip_cli --version
Rubyripper version 0.6.0b2.
exit

Usage: rrip_cli [options]
  -V, --version        Show current version of rubyripper.
  -f, --file <FILE>    Load configuration settings from file <FILE>.
  -v, --verbose        Display verbose output.
  -c, --configure      Change configuration settings.
  -a, --all            Rip all tracks. Skip any questions about track
selection.
  -h, --help           Show this usage statement.
------------------------------------------------------------------------
Why does the --version switch *print* exit and the help info?
I took a look at rrip_cli(rubyripper_cli.rb) but couldn't see no reason for
this behavior.
I'm interested what could have caused this.
------------------------------------------------------------------------

1) What version of rubyripper are you using? On what operating system?
-> 0.6.0b2, fresh from git.
   $ ruby -v
   ruby 1.9.1p376 (2009-12-07 revision 26041) [i686-linux]

2) Are you using the gtk2 or the commandline interface?
-> cli

Original issue reported on code.google.com by loliloli...@gmail.com on 22 Dec 2009 at 2:41

GoogleCodeExporter commented 8 years ago
Apparently the exit() command in the Option parses is neglected. I've not coded 
this 
part myself, so I do not consider myself an expert here. But I've tried a few 
things 
and solved the problem.

The right way is to set a flag in the @option object, so @option.version = 
true. Or 
any value for that matter. Then in the end of the parsing when @option.version 
exists, 
exit().

Original comment by boukewou...@gmail.com on 6 Feb 2010 at 10:59

GoogleCodeExporter commented 8 years ago
I forgot, this is commit 
http://github.com/rubyripperdev/rubyripper/commit/a709f048e2c12d363e1ef8498e2a44
d2d373
4f91

Original comment by boukewou...@gmail.com on 6 Feb 2010 at 10:59