diff --git a/devops-service/commands/knife_commands.rb b/devops-service/commands/knife_commands.rb index 00ca6c6..ccaa811 100644 --- a/devops-service/commands/knife_commands.rb +++ b/devops-service/commands/knife_commands.rb @@ -73,7 +73,7 @@ EOH end def knife cmd - o = `knife #{cmd} -c #{self.config} 2>&1` + o = `bundle exec knife #{cmd} -c #{self.config} 2>&1` return o, $?.success? end @@ -82,7 +82,7 @@ EOH end def ssh_stream out, cmd, host, user, cert - knife_cmd = "knife ssh -c #{self.config} #{ssh_options(cmd, host, user, cert).join(" ")}" + knife_cmd = "bundle exec knife ssh -c #{self.config} #{ssh_options(cmd, host, user, cert).join(" ")}" out << "\nExecuting '#{knife_cmd}' \n\n" out.flush if out.respond_to?(:flush) status = 2 @@ -103,7 +103,7 @@ EOH end def knife_stream out, cmd, options=[] - knife_cmd = "knife #{cmd} #{options.join(" ")} -c #{self.config}" + knife_cmd = "bundle exec knife #{cmd} #{options.join(" ")} -c #{self.config}" out << "\nExecuting '#{knife_cmd}' \n\n" out.flush if out.respond_to?(:flush) status = nil