HomePhorge

(#17492) Fix --run_mode=foo global option parsing
612f53ad3b76Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(#17492) Fix --run_mode=foo global option parsing

Without this patch applied Puppet behaves as expected when given
--run_mode user, but not when given --run_mode=user. This is a
problem because The Foreman passes arguments to Puppet as a single
argument in the argument vector and this exceptional behavior is a
blocker for The Foreman supporting Puppet 3.

This patch fixes the problem by removing the --run_mode argument from
the argument vector after the option_parser is done processing. This
prevents subsequent option parsing from trying to process the option and
failing to do so.

Original commit message:

parse_global_options now supports --run_mode=foo style arguments as well
space-separated arguments.

Reviewed-by: Jeff McCune <jeff@puppetlabs.com>

Details

Provenance
Dominic Cleal <dcleal@redhat.com>Authored on
Jeff McCune <jeff@puppetlabs.com>Committed on Nov 14 2012, 5:08 PM
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPUe4e16db50e30: Merge pull request #1262 from haus/ticket/3.0.x/17445_fixup_logrotate_rules
Branches
Unknown
Tags
Unknown

Event Timeline

Jeff McCune <jeff@puppetlabs.com> committed rPU612f53ad3b76: (#17492) Fix --run_mode=foo global option parsing (authored by Dominic Cleal <dcleal@redhat.com>).Nov 14 2012, 5:08 PM