lib/vagabond/uploader/knife.rb in vagabond-0.2.8 vs lib/vagabond/uploader/knife.rb in vagabond-0.2.10

- old
+ new

@@ -1,24 +1,18 @@ +#encoding: utf-8 require 'vagabond/uploader' module Vagabond class Uploader class Knife < Uploader def upload(*args) prepare unless args.include?(:no_prepare) - com = "knife cookbook upload#{options[:knife_opts]} --all" + com = "cookbook upload#{options[:knife_opts]} --all" if(options[:cookbook_paths]) com << " --cookbook-path #{Array(options[:cookbook_paths]).join(':')}" end - if(File.exists?(knife_config = File.join(store, '.chef/knife.rb'))) - com << " --config #{knife_config}" - end - debug(com) - cmd = Mixlib::ShellOut.new(com, - :live_stream => options[:debug], - :cwd => store - ) + cmd = knife_command(com, :cwd => store) cmd.run_command cmd.error! end end