From 31cd306f2096cb2a2cde36700232cde3330b3d63 Mon Sep 17 00:00:00 2001 From: Alex Vinyar Date: Wed, 28 Jan 2015 04:39:55 -0800 Subject: [PATCH 1/2] making a change to installer file for windows to allow local path installation --- lib/vagrant-omnibus/action/install_chef.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/vagrant-omnibus/action/install_chef.rb b/lib/vagrant-omnibus/action/install_chef.rb index 5a32611..986cabe 100644 --- a/lib/vagrant-omnibus/action/install_chef.rb +++ b/lib/vagrant-omnibus/action/install_chef.rb @@ -214,7 +214,8 @@ def fetch_or_create_install_script(env) set version=%1 set dest=%~dp0chef-client-%version%-1.windows.msi echo Downloading Chef %version% for Windows... - powershell -command "(New-Object System.Net.WebClient).DownloadFile('#{url}?v=%version%', '%dest%')" + powershell -command "if(test-path '#{url}/chef-client*%version%*.msi'){[array]$tempstore = dir #{url} | ?{$_.name -like 'chef-client*%version%*.msi'};copy $tempstore[0].fullname %dest%}else{(New-Object System.Net.WebClient).DownloadFile('#{url}?v=%version%', '%dest%')}" + echo Installing Chef %version% msiexec /q /i %dest% EOH From 7e02981156eab74a593b3180799ebb6af0113f84 Mon Sep 17 00:00:00 2001 From: Alex Vinyar Date: Wed, 28 Jan 2015 04:40:57 -0800 Subject: [PATCH 2/2] nuking whitespace --- lib/vagrant-omnibus/action/install_chef.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/vagrant-omnibus/action/install_chef.rb b/lib/vagrant-omnibus/action/install_chef.rb index 986cabe..02f363d 100644 --- a/lib/vagrant-omnibus/action/install_chef.rb +++ b/lib/vagrant-omnibus/action/install_chef.rb @@ -215,7 +215,6 @@ def fetch_or_create_install_script(env) set dest=%~dp0chef-client-%version%-1.windows.msi echo Downloading Chef %version% for Windows... powershell -command "if(test-path '#{url}/chef-client*%version%*.msi'){[array]$tempstore = dir #{url} | ?{$_.name -like 'chef-client*%version%*.msi'};copy $tempstore[0].fullname %dest%}else{(New-Object System.Net.WebClient).DownloadFile('#{url}?v=%version%', '%dest%')}" - echo Installing Chef %version% msiexec /q /i %dest% EOH