diff options
| author | Josh Cooper <josh@puppetlabs.com> | 2011-07-18 22:28:18 -0700 |
|---|---|---|
| committer | Jacob Helwig <jacob@puppetlabs.com> | 2011-08-19 13:48:29 -0700 |
| commit | fe81decc5336a540ba9e65e0da48f5a5e3b52274 (patch) | |
| tree | 4163826f9de704395b85cdb9c52aaa75bd692c29 /lib/puppet/indirector | |
| parent | a4378128c214d3c8c349a8052f018c13417b7cb1 (diff) | |
| download | puppet-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/puppet/indirector')
| -rw-r--r-- | lib/puppet/indirector/facts/facter.rb | 4 |
1 files changed, 2 insertions, 2 deletions
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 |
