From da345e3d7fe70c9c6a453a2ee3206889a96b80a7 Mon Sep 17 00:00:00 2001 From: Daryl McMillan Date: Mon, 4 Apr 2022 11:49:23 -0400 Subject: [PATCH] Update for latest chocolatey release The current chocolatey release has removed the long-deprecated `Write-ChocolateySuccess` and `Write-ChocolateyFailure` functions. https://github.com/chocolatey/choco/issues/2469 --- .../tools/chocolateyInstall.ps1 | 20 +++++++------------ 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/AWSTools.Powershell/tools/chocolateyInstall.ps1 b/AWSTools.Powershell/tools/chocolateyInstall.ps1 index e7f7391..b37ec69 100644 --- a/AWSTools.Powershell/tools/chocolateyInstall.ps1 +++ b/AWSTools.Powershell/tools/chocolateyInstall.ps1 @@ -1,16 +1,10 @@ $package = 'AWSTools.Powershell' -try { - $params = @{ - packageName = $package; - fileType = 'msi'; - silentArgs = '/quiet'; - url = 'http://sdk-for-net.amazonwebservices.com/latest/AWSToolsAndSDKForNet.msi'; - } - - Install-ChocolateyPackage @params - Write-ChocolateySuccess $package -} catch { - Write-ChocolateyFailure $package "$($_.Exception.Message)" - throw +$params = @{ + packageName = $package; + fileType = 'msi'; + silentArgs = '/quiet'; + url = 'http://sdk-for-net.amazonwebservices.com/latest/AWSToolsAndSDKForNet.msi'; } + +Install-ChocolateyPackage @params