From a6816fff5a0421d614da50eeaf12aa7178a82b09 Mon Sep 17 00:00:00 2001 From: Nigel Kersten Date: Fri, 26 Jun 2009 13:28:44 -0700 Subject: Set ENV['PATH'] to an empty string if non-existent Signed-off-by: Nigel Kersten --- lib/puppet/defaults.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/puppet/defaults.rb b/lib/puppet/defaults.rb index 328189038..b2de823a5 100644 --- a/lib/puppet/defaults.rb +++ b/lib/puppet/defaults.rb @@ -91,8 +91,8 @@ module Puppet from the parent process.", :call_on_define => true, # Call our hook with the default value, so we always get the libdir set. :hook => proc do |value| + ENV["PATH"] = "" if ENV["PATH"].nil? ENV["PATH"] = value unless value == "none" - paths = ENV["PATH"].split(File::PATH_SEPARATOR) %w{/usr/sbin /sbin}.each do |path| unless paths.include?(path) -- cgit