diff --git a/lib/vagrant/plugin/v2/push.rb b/lib/vagrant/plugin/v2/push.rb index 002479b33..f8bc15d53 100644 --- a/lib/vagrant/plugin/v2/push.rb +++ b/lib/vagrant/plugin/v2/push.rb @@ -2,16 +2,16 @@ module Vagrant module Plugin module V2 class Push - attr_reader :environment + attr_reader :env attr_reader :config # Initializes the pusher with the given environment the push # configuration. # - # @param [environment] environment + # @param [Environment] env # @param [Object] config Push configuration - def initialize(environment, config) - @environment = environment + def initialize(env, config) + @env = env @config = config end diff --git a/plugins/pushes/harmony/push.rb b/plugins/pushes/harmony/push.rb index 9fd926fee..022c5db07 100644 --- a/plugins/pushes/harmony/push.rb +++ b/plugins/pushes/harmony/push.rb @@ -23,11 +23,11 @@ module VagrantPlugins # if we're on a system that doesn't support exec, so handle that properly. def execute(uploader) cmd = [] - cmd << "-vcs" if @config.vcs - cmd += @config.include.map { |v| ["-include", v] } - cmd += @config.exclude.map { |v| ["-exclude", v] } - cmd << @config.app - cmd << File.expand_path(@config.dir, @environment.root_path) + cmd << "-vcs" if config.vcs + cmd += config.include.map { |v| ["-include", v] } + cmd += config.exclude.map { |v| ["-exclude", v] } + cmd << config.app + cmd << File.expand_path(config.dir, env.root_path) Vagrant::Util::SafeExec.exec(uploader, *cmd.flatten) end @@ -37,7 +37,7 @@ module VagrantPlugins # @return [String] def uploader_path # Determine the uploader path - uploader = @config.uploader_path + uploader = config.uploader_path if uploader return uploader end