Open Hawke opened 11 years ago
The bug really is in optparse. I'll see if I can work around it. The argument is not optional, so if explicitly you want relative paths, you need to set it to an empty value using ""
Still crashes for me in current git…
Works here: $ rip cd rip -O Usage: rip cd rip
rip: error: -O option requires an argument
what is your actual command line and what is the traceback?
$ rip cd rip -O Usage: rip cd rip
rip: error: -O option requires an argument
Traceback (most recent call last):
File "/home/$USER/Documents/Source/git/morituri/bin/rip", line 39, in
I don't see how this can be happening. Can you rerun the same command, with RIP_DEBUG=5 this time? Please make sure you run latest git master.
I can't reproduce the issue. Are you still getting this @Hawke?
According to the help output: -O OUTPUT_DIRECTORY, --output-directory=OUTPUT_DIRECTORY output directory; will be included in file paths in result files (defaults to absolute path to current directory; set to empty if you want paths to be relative instead)
However, 'rip cd rip -O' will crash: File "…morituri/morituri/extern/command/command.py", line 114, in parse_args return optparse.OptionParser.parse_args(self, args, values) File "/usr/lib/python2.7/optparse.py", line 1399, in parse_args stop = self._process_args(largs, rargs, values) File "/usr/lib/python2.7/optparse.py", line 1443, in _process_args self._process_short_opts(rargs, values) File "/usr/lib/python2.7/optparse.py", line 1550, in _process_short_opts option.process(opt, value, values, self) UnboundLocalError: local variable 'value' referenced before assignment
You need to explicitly specify the value as "" or something before it will work. It would be better if this were not necessary.