summaryrefslogtreecommitdiffstats
path: root/lib/puppet/node
diff options
context:
space:
mode:
authorJosh Cooper <josh@puppetlabs.com>2011-07-19 14:16:49 -0700
committerJosh Cooper <josh@puppetlabs.com>2011-07-19 14:16:49 -0700
commit21c5929aae899e559e9a813c48424da4fcbec54b (patch)
treefa90342427d0cd41c6aea56df8d89d2deb3def9d /lib/puppet/node
parentd69bf48ecae71ff01679bb38cdeebc8f4a8b8b15 (diff)
parent0e4ae653c0628cb0df9ccace98bca4bc7478fb7c (diff)
downloadpuppet-21c5929aae899e559e9a813c48424da4fcbec54b.tar.gz
puppet-21c5929aae899e559e9a813c48424da4fcbec54b.tar.xz
puppet-21c5929aae899e559e9a813c48424da4fcbec54b.zip
Merge branch 'feature/master/8268-puppet-agent-windows'
* feature/master/8268-puppet-agent-windows: Maint: Fix miscellaneous tests Maint: Don't test for extended signals on Windows Maint: Tagged spec tests that are known to fail on Windows Fix tests with "relative" paths on Windows (#8268) Require windows drive letters in absolute file paths (#8489) Consistently use File::PATH_SEPARATOR
Diffstat (limited to 'lib/puppet/node')
-rw-r--r--lib/puppet/node/environment.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/puppet/node/environment.rb b/lib/puppet/node/environment.rb
index dc631979e..96fdc3c1e 100644
--- a/lib/puppet/node/environment.rb
+++ b/lib/puppet/node/environment.rb
@@ -136,14 +136,15 @@ class Puppet::Node::Environment
end
def validate_dirs(dirs)
+ dir_regex = Puppet.features.microsoft_windows? ? /^[A-Za-z]:#{File::SEPARATOR}/ : /^#{File::SEPARATOR}/
dirs.collect do |dir|
- if dir !~ /^#{File::SEPARATOR}/
+ if dir !~ dir_regex
File.join(Dir.getwd, dir)
else
dir
end
end.find_all do |p|
- p =~ /^#{File::SEPARATOR}/ && FileTest.directory?(p)
+ p =~ dir_regex && FileTest.directory?(p)
end
end