diff options
author | lutter <lutter@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-03-09 01:40:35 +0000 |
---|---|---|
committer | lutter <lutter@980ebf18-57e1-0310-9a29-db15c13687c0> | 2007-03-09 01:40:35 +0000 |
commit | b05ae2ae1262469df264e3a35b30f7a1d1805c18 (patch) | |
tree | 3bfddce3908cbccd21306972fca97a8c9def61b7 | |
parent | 0fa3c434b658fe432c306dc9e52e6b8c949ad3cf (diff) | |
download | puppet-b05ae2ae1262469df264e3a35b30f7a1d1805c18.tar.gz puppet-b05ae2ae1262469df264e3a35b30f7a1d1805c18.tar.xz puppet-b05ae2ae1262469df264e3a35b30f7a1d1805c18.zip |
Don't blow up when PUPPETLIB isn't set
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2280 980ebf18-57e1-0310-9a29-db15c13687c0
-rw-r--r-- | lib/puppet/modules.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/puppet/modules.rb b/lib/puppet/modules.rb index b1b8804ea..5e7868cb5 100644 --- a/lib/puppet/modules.rb +++ b/lib/puppet/modules.rb @@ -9,7 +9,10 @@ class Puppet::Module # parameter. Only consider paths that are absolute and existing # directories def self.modulepath - dirs = ENV["PUPPETLIB"].split(":") + Puppet[:modulepath].split(":") + dirs = Puppet[:modulepath].split(":") + if ENV["PUPPETLIB"] + dirs = ENV["PUPPETLIB"].split(":") + dirs + end dirs.select do |p| p =~ /^#{File::SEPARATOR}/ && File::directory?(p) end |