lib/vagrant-adam/action/pre_provision_script.rb
#
# Upload provision script from Host's Vagrant TMP directory to guest
# and executes.
#
Upload provision script from Host's Vagrant TMP directory to guest
and executes.
Upload provision script from Host ' s Vagrant TMP directory to guest and executes .
def run_provision_script(env)
          @machine.communicate.tap do |comm|
            comm.upload(@script_tmp_path, provision_script_name)
            if windows_guest?
            else
              provision_cmd = "sh #{provision_script_name}"
              provision_cmd << ' 2>&1'
            end
            env[:ui].info(I18n.t('vagrant_adam.pre_provision_script_start'))
            comm.sudo(provision_cmd) do |type, data|
              if [:stderr, :stdout].include?(type)
                env[:ui].info(data)
              end
            end
            env[:ui].info(I18n.t('vagrant_adam.pre_provision_script_finish'))
          end
        end
def run_provision_script ( env ) @machine . communicate . tap do | comm | comm . upload ( @script_tmp_path , provision_script_name ) if windows_guest? else provision_cmd = "sh #{provision_script_name}" provision_cmd << ' 2>&1' end env [ :ui ] . info ( I18n . t ( 'vagrant_adam.pre_provision_script_start' ) ) comm . sudo ( provision_cmd ) do | type , data | if [ :stderr , :stdout ] . include? ( type ) env [ :ui ] . info ( data ) end end env [ :ui ] . info ( I18n . t ( 'vagrant_adam.pre_provision_script_finish' ) ) end end
Upload provision script from Host's Vagrant TMP directory to guest
and executes.
Upload provision script from Host ' s Vagrant TMP directory to guest and executes .
# Not sure yet...
env
<not_specific>