Issue #2420 has been reported by James Turnbull.
----------------------------------------
Bug #2420: The getopt parser in application.rb only seems to handle long options
http://projects.reductivelabs.com/issues/2420
Author: James Turnbull
Status: Needs more information
Priority: Normal
Assigned to: Brice Figureau
Category: executables
Target version: 0.25.0
Complexity: Unknown
Affected version: 0.24.8
Keywords:
See this code block in application.rb:
<pre>
# used to declare code that handle an option
def option(*options, &block)
long = options.find { |opt| opt =~ /^--/
}.gsub(/^--(?:\[no-\])?([^ =]+).*$/, '\1' ).gsub('-','_')
fname = "handle_#{long}"
if (block_given?)
meta_def(symbolize(fname), &block)
else
meta_def(symbolize(fname)) do |value|
self.options["#{long}".to_sym] = value
end
end
@opt_parser.on(*options) do |value|
self.send(symbolize(fname), value)
end
end
</pre>
Brice - not sure if I am understanding this correctly but wouldn't this ignore
any short options?
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://reductivelabs.com/redmine/my/account
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en
-~----------~----~----~----~------~----~------~--~---