On Tue, Jul 19, 2011 at 14:59, Josh Cooper <j...@puppetlabs.com> wrote:
> Puppet uses both colon and File::PATH_SEPARATOR in various places, which
> does not work on Windows, where File::PATH_SEPARATOR is a semi-colon. This
> commit changes the code and tests to consistently use File::PATH_SEPARATOR.
>
> Reviewed-by: Jacob Helwig <ja...@puppetlabs.com>
> Signed-off-by: Josh Cooper <j...@puppetlabs.com>
> ---
> Local-branch: feature/master/8268-puppet-agent-windows
>  lib/puppet/defaults.rb                            |    8 +++++---
>  lib/puppet/indirector/facts/facter.rb             |    4 ++--
>  spec/unit/indirector/resource_type/parser_spec.rb |    2 +-
>  spec/unit/module_spec.rb                          |    4 ++--
>  spec/unit/parser/type_loader_spec.rb              |    2 +-
>  5 files changed, 11 insertions(+), 9 deletions(-)
>
> diff --git a/lib/puppet/defaults.rb b/lib/puppet/defaults.rb
> index d5e06c5..e6beb51 100644
> --- a/lib/puppet/defaults.rb
> +++ b/lib/puppet/defaults.rb
> @@ -441,9 +441,11 @@ module Puppet
>       authorization system for `puppet master`."
>     ],
>     :ca => [true, "Wether the master should function as a certificate 
> authority."],
> -    :modulepath => {:default => "$confdir/modules:/usr/share/puppet/modules",
> -      :desc => "The search path for modules as a colon-separated list of
> -      directories.", :type => :setting }, # We don't want this to be 
> considered a file, since it's multiple files.
> +    :modulepath => {
> +      :default => 
> "$confdir/modules#{File::PATH_SEPARATOR}/usr/share/puppet/modules",

This is kind of ugly, but...

> +      :desc => "The search path for modules as a list of directories 
> separated by the '#{File::PATH_SEPARATOR}' character.",

...this is just wrong.  We are going to generate documentation about
this based on the platform we run our generator on, which is assured
to be wrong in one of the two common cases – since it can't run on
*both* at once.

Daniel
-- 
⎋ Puppet Labs Developer – http://puppetlabs.com
✉ Daniel Pittman <dan...@puppetlabs.com>
✆ Contact me via gtalk, email, or phone: +1 (877) 575-9775
♲ Made with 100 percent post-consumer electrons

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to puppet-dev@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to