summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJosh Cooper <josh@puppetlabs.com>2011-07-18 22:28:18 -0700
committerJacob Helwig <jacob@puppetlabs.com>2011-08-19 13:48:29 -0700
commitfe81decc5336a540ba9e65e0da48f5a5e3b52274 (patch)
tree4163826f9de704395b85cdb9c52aaa75bd692c29 /lib
parenta4378128c214d3c8c349a8052f018c13417b7cb1 (diff)
downloadpuppet-fe81decc5336a540ba9e65e0da48f5a5e3b52274.tar.gz
puppet-fe81decc5336a540ba9e65e0da48f5a5e3b52274.tar.xz
puppet-fe81decc5336a540ba9e65e0da48f5a5e3b52274.zip
(#8489) Consistently use File::PATH_SEPARATOR
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 <jacob@puppetlabs.com> (cherry picked from commit 26ee468e8b963d63933d9a27a65d55510ff87618)
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/defaults.rb8
-rw-r--r--lib/puppet/indirector/facts/facter.rb4
2 files changed, 7 insertions, 5 deletions
diff --git a/lib/puppet/defaults.rb b/lib/puppet/defaults.rb
index b9859b03b..106e94b02 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",
+ :desc => "The search path for modules as a list of directories separated by the '#{File::PATH_SEPARATOR}' character.",
+ :type => :setting # We don't want this to be considered a file, since it's multiple files.
+ },
:ssl_client_header => ["HTTP_X_CLIENT_DN", "The header containing an authenticated
client's SSL DN. Only used with Mongrel. This header must be set by the proxy
to the authenticated client's SSL DN (e.g., `/CN=puppet.puppetlabs.com`).
diff --git a/lib/puppet/indirector/facts/facter.rb b/lib/puppet/indirector/facts/facter.rb
index ab7378a34..6312a95fb 100644
--- a/lib/puppet/indirector/facts/facter.rb
+++ b/lib/puppet/indirector/facts/facter.rb
@@ -9,12 +9,12 @@ class Puppet::Node::Facts::Facter < Puppet::Indirector::Code
def self.load_fact_plugins
# Add any per-module fact directories to the factpath
- module_fact_dirs = Puppet[:modulepath].split(":").collect do |d|
+ module_fact_dirs = Puppet[:modulepath].split(File::PATH_SEPARATOR).collect do |d|
["lib", "plugins"].map do |subdirectory|
Dir.glob("#{d}/*/#{subdirectory}/facter")
end
end.flatten
- dirs = module_fact_dirs + Puppet[:factpath].split(":")
+ dirs = module_fact_dirs + Puppet[:factpath].split(File::PATH_SEPARATOR)
x = dirs.each do |dir|
load_facts_in_dir(dir)
end