summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/util.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/puppet/util.rb b/lib/puppet/util.rb
index d6de3e2e1..59f732dae 100644
--- a/lib/puppet/util.rb
+++ b/lib/puppet/util.rb
@@ -227,7 +227,11 @@ module Util
end
else
x = %x{which #{bin} 2>/dev/null}.chomp
- return x
+ if x == ""
+ return nil
+ else
+ return x
+ end
end
end
module_function :binary