summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet')
-rwxr-xr-xlib/puppet/type/exec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/puppet/type/exec.rb b/lib/puppet/type/exec.rb
index 41150ba94..8a773e93e 100755
--- a/lib/puppet/type/exec.rb
+++ b/lib/puppet/type/exec.rb
@@ -513,12 +513,12 @@ module Puppet
if self[:path]
if Puppet.features.posix? and !File.exists?(exe)
withenv :PATH => self[:path].join(File::PATH_SEPARATOR) do
- path = %{which #{exe}}.chomp
+ path = %x{which #{exe}}.chomp
if path == ""
raise ArgumentError,
"Could not find command '%s'" % exe
else
- exe = File.join(path, exe)
+ exe = path
end
end
elsif Puppet.features.win32? and !File.exists?(exe)