Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-4429

Puppet command line tools accept partial matches for flags without altering behavior

    Details

    • Type: Bug
    • Status: Accepted
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: PUP 3.7.5, PUP 4.0.0
    • Fix Version/s: PUP 5.y
    • Component/s: None
    • Labels:
    • Template:
    • Team:
      Coremunity

      Description

      The Puppet command line tools will accept partial matches for flags, but do not use the values provided. This causes unexpected behavior when a command accepts a flag or type but doesn't actually act upon it.

      Reproduction Case

      Install Puppet 3.7.x or 4.0.x.

      Execute config print commands with flags that affect settings, such as puppet agent --no-daemonize --configprint daemonize with various truncations of the --no-daemonize flag.

      Outcome

      Partial matches are accepted, but don't alter the setting value:

      puppet agent --no-daemon --configprint daemonize
      true
       
      puppet agent --no-daemoniz --configprint daemonize
      true
       
      # Correct behavior when flag is fully specified.
      puppet agent --no-daemonize --configprint daemonize
      false
      

      Expected Outcome

      The Puppet command line interface should treat partial flags the same way as missing flags and throw an 'invalid option' error:

      puppet agent --no-daemon
      Error: Could not parse application options: invalid option: --no-daemon
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                chuck Charlie Sharpsteen
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Zendesk Support