knife -> bundle exec knife

This commit is contained in:
Anton Martynov 2015-10-01 13:13:12 +03:00
parent 73a68455bd
commit e8677efc69

View File

@ -73,7 +73,7 @@ EOH
end end
def knife cmd def knife cmd
o = `knife #{cmd} -c #{self.config} 2>&1` o = `bundle exec knife #{cmd} -c #{self.config} 2>&1`
return o, $?.success? return o, $?.success?
end end
@ -82,7 +82,7 @@ EOH
end end
def ssh_stream out, cmd, host, user, cert 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 << "\nExecuting '#{knife_cmd}' \n\n"
out.flush if out.respond_to?(:flush) out.flush if out.respond_to?(:flush)
status = 2 status = 2
@ -103,7 +103,7 @@ EOH
end end
def knife_stream out, cmd, options=[] 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 << "\nExecuting '#{knife_cmd}' \n\n"
out.flush if out.respond_to?(:flush) out.flush if out.respond_to?(:flush)
status = nil status = nil