From 0e2f34076558fcdbf7e81b493b9537bfccbd9dad Mon Sep 17 00:00:00 2001 From: d35ha Date: Wed, 2 Oct 2024 09:07:19 +0000 Subject: [PATCH] Support the valid return codes at googlechrome.vm --- packages/googlechrome.vm/googlechrome.vm.nuspec | 2 +- .../googlechrome.vm/tools/chocolateyinstall.ps1 | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/packages/googlechrome.vm/googlechrome.vm.nuspec b/packages/googlechrome.vm/googlechrome.vm.nuspec index b93e9873d..9226cd9d1 100644 --- a/packages/googlechrome.vm/googlechrome.vm.nuspec +++ b/packages/googlechrome.vm/googlechrome.vm.nuspec @@ -2,7 +2,7 @@ googlechrome.vm - 0.0.0.20240425 + 0.0.0.20241002 Google LLC. Chrome is a popular web browser. diff --git a/packages/googlechrome.vm/tools/chocolateyinstall.ps1 b/packages/googlechrome.vm/tools/chocolateyinstall.ps1 index b01626503..174171581 100644 --- a/packages/googlechrome.vm/tools/chocolateyinstall.ps1 +++ b/packages/googlechrome.vm/tools/chocolateyinstall.ps1 @@ -1,6 +1,10 @@ $ErrorActionPreference = 'Stop' Import-Module vm.common -Force -DisableNameChecking +$fileType = "MSI" +$silentArgs = "/quiet /norestart /l*v `"$($env:TEMP)\$($env:chocolateyPackageName).$($env:chocolateyPackageVersion).MsiInstall.log`"" +$validExitCodes = @(0, 3010, 1603, 1605, 1614, 1641) + try { # Download the installer $packageArgs = @{ @@ -14,11 +18,12 @@ try { VM-Assert-Signature $filePath # Install the downloaded installer - $packageArgs = @{ - packageName = $env:ChocolateyPackageName - file = $filePath - fileType = 'MSI' - silentArgs = "/quiet /norestart /l*v `"$($env:TEMP)\$($env:chocolateyPackageName).$($env:chocolateyPackageVersion).MsiInstall.log`"" + $packageArgs = @{ + packageName = $env:ChocolateyPackageName + file = $filePath + fileType = $fileType + silentArgs = $silentArgs + validExitCodes = $validExitCodes } Install-ChocolateyInstallPackage @packageArgs -ErrorAction SilentlyContinue