From 9e26fdc96e32254d3e455830c867718cbc5a56c1 Mon Sep 17 00:00:00 2001 From: Tony Apuzzo Date: Tue, 11 Sep 2018 08:41:51 -0600 Subject: [PATCH] Fix #1099 by warning on plugin repair failure. --- automatic/vagrant/tools/chocolateyinstall.ps1 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/automatic/vagrant/tools/chocolateyinstall.ps1 b/automatic/vagrant/tools/chocolateyinstall.ps1 index dc9045a189b..8bdb27e8a39 100644 --- a/automatic/vagrant/tools/chocolateyinstall.ps1 +++ b/automatic/vagrant/tools/chocolateyinstall.ps1 @@ -16,4 +16,10 @@ $packageArgs = @{ Install-ChocolateyPackage @packageArgs Update-SessionEnvironment -vagrant plugin repair #https://github.com/chocolatey/chocolatey-coreteampackages/issues/1024 + +$ErrorActionPreference = 'Continue' #https://github.com/chocolatey/chocolatey-coreteampackages/issues/1099 +vagrant plugin repair #https://github.com/chocolatey/chocolatey-coreteampackages/issues/1024 +if ($LastExitCode -ne 0) { #https://github.com/chocolatey/chocolatey-coreteampackages/issues/1099 + Write-Host "WARNING: Plugin repair failed, run 'vagrant plugin expunge --reinstall' after rebooting." +} +$LastExitCode = 0