lib/veewee/provider/core/box/copy.rb in veewee-0.4.3 vs lib/veewee/provider/core/box/copy.rb in veewee-0.4.4

- old
+ new

@@ -3,11 +3,17 @@ module Core module BoxCommand def copy_to_box(localfile,remotefile,options={}) raise Veewee::Error,"Box is not running" unless self.running? - if definition.winrm_user && definition.winrm_password # prefer winrm + if + definition.winrm_user && definition.winrm_password # prefer winrm + then self.wincp(localfile,remotefile,options) + elsif + definition.os_type_id =~ /^Windows/ + then + raise "Trying to transfer #{localfile} to windows machine without 'winrm_user' and 'winrm_password' set in definition." else self.scp(localfile,remotefile,options) end end end # Module