summaryrefslogtreecommitdiff
path: root/lib/chef/mixin/which.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/mixin/which.rb')
-rw-r--r--lib/chef/mixin/which.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/mixin/which.rb b/lib/chef/mixin/which.rb
index 8f42a10dcf..974cb50fa3 100644
--- a/lib/chef/mixin/which.rb
+++ b/lib/chef/mixin/which.rb
@@ -40,7 +40,7 @@ class Chef
# for test stubbing
def env_path
- if Chef::Config.target_mode
+ if Chef::Config.target_mode?
Chef.run_context.transport_connection.run_command("echo $PATH").stdout
else
ENV["PATH"]
@@ -49,7 +49,7 @@ class Chef
def valid_executable?(filename, &block)
is_executable =
- if Chef::Config.target_mode
+ if Chef::Config.target_mode?
connection = Chef.run_context.transport_connection
connection.file(filename).stat[:mode] & 1 && !connection.file(filename).directory?
else