Issue #7699 has been updated by Dan Bode.

Status changed from Tests Insufficient to Merged - Pending Release

commit b82f29c61aa84a12fc208487e4b049cb24702261
This had already been merged into 2.7.x

Author: Dan Bode <[email protected]>
Date:   Wed Jul 13 15:38:32 2011 -0700

    (#7699) Help command should only list options once
    
    The problem was caused by the fact that the
    options method returns a list of options that
    treated the aliases as seperate options.
    
    The fix is to only maintain a list of options
    and not add all aliases to the options list.
----------------------------------------
Bug #7699: puppet help type command lists options twice for actions with option 
alias
https://projects.puppetlabs.com/issues/7699

Author: Dan Bode
Status: Merged - Pending Release
Priority: Normal
Assignee: Dan Bode
Category: Faces
Target version: 2.7.3
Affected Puppet version: 2.7.0rc2
Keywords: faces
Branch: https://github.com/bodepd/puppet/tree/issue/2.7.x/7699


given the following face action:

<pre>
  action :install do
    option '--version version' do
      summary "Version to install (can be a requirement, eg '>= 1.0.3', 
defaults to latest version)"
    end
    summary "Install a module (eg, 'user-modname') from a repository or file"
    examples "puppet module install MODULE_NAME_OR_FILE [OPTIONS]"
    option '--puppet_module_repository repo', '-r repo' do
      summary 'Module repo to use'
    end
    option '--force', '-f' do
      summary "Force overwrite of existing module, if any"
    end
    when_invoked do |name, options|
      Puppet::Module::Tool::Applications::Installer.run(name, options)
    end
  end
</pre>

when I retrieve help for the action:

<pre>
puppet help module install
puppet module install(1) -- Install a module (eg, 'user-modname') from a 
repository or file
===========================================================================================

SYNOPSIS
--------

puppet module install
[--version version][--puppet_module_repository repo
|
-r repo][--puppet_module_repository repo | -r repo][--force | -f][--force | -f]

OPTIONS
-------
  --force |-f
Force overwrite of existing module, if any


  --force |-f
Force overwrite of existing module, if any


  --puppet_module_repository repo |-r repo
Module repo to use


  --puppet_module_repository repo |-r repo
Module repo to use


  --version version
Version to install (can be a requirement, eg '>= 1.0.3', defaults to latest 
version)


EXAMPLES
--------
puppet module install MODULE_NAME_OR_FILE [OPTIONS]
COPYRIGHT AND LICENSE
---------------------
Unknown copyright owner and years.
All Rights Reserved
</pre>

options that have an alias specified are mentioned twice:

ie:
<pre>
option '--version version' - appears once in the help

  --version version
Version to install (can be a requirement, eg '>= 1.0.3', defaults to latest 
version)

option '--force', '-f' do - appears twice

OPTIONS
-------
  --force |-f
Force overwrite of existing module, if any


  --force |-f
Force overwrite of existing module, if any

</pre>


-- 
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://projects.puppetlabs.com/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.

Reply via email to