Skip to content

Commit

Permalink
Merge pull request #1146 from d35ha/fix-googlechrome.vm
Browse files Browse the repository at this point in the history
Support the valid return codes at googlechrome.vm
  • Loading branch information
Ana06 authored Oct 2, 2024
2 parents 622c271 + 0e2f340 commit 8547c45
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/googlechrome.vm/googlechrome.vm.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
<metadata>
<id>googlechrome.vm</id>
<version>0.0.0.20240425</version>
<version>0.0.0.20241002</version>
<authors>Google LLC.</authors>
<description>Chrome is a popular web browser.</description>
<dependencies>
Expand Down
15 changes: 10 additions & 5 deletions packages/googlechrome.vm/tools/chocolateyinstall.ps1
Original file line number Diff line number Diff line change
@@ -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 = @{
Expand All @@ -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

Expand Down

0 comments on commit 8547c45

Please sign in to comment.