mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fixes idempotency issue when upgrading chocolatey packages (#21476)
This commit is contained in:
parent
89cf8d83e4
commit
9be30f2eca
1 changed files with 2 additions and 2 deletions
|
@ -198,7 +198,7 @@ Function Choco-Upgrade
|
||||||
$cmd += " --execution-timeout=$executiontimeout"
|
$cmd += " --execution-timeout=$executiontimeout"
|
||||||
}
|
}
|
||||||
|
|
||||||
$results = invoke-expression $cmd
|
$output = invoke-expression $cmd
|
||||||
|
|
||||||
$result.rc = $LastExitCode
|
$result.rc = $LastExitCode
|
||||||
if ($LastExitCode -notin $successexitcodes)
|
if ($LastExitCode -notin $successexitcodes)
|
||||||
|
@ -208,7 +208,7 @@ Function Choco-Upgrade
|
||||||
Throw "Error installing $package"
|
Throw "Error installing $package"
|
||||||
}
|
}
|
||||||
|
|
||||||
if ("$output" -match ' upgraded (\d+)/\d+ package\(s\)\. ')
|
if ("$output" -match ' upgraded (\d+)/\d+ package')
|
||||||
{
|
{
|
||||||
if ($matches[1] -gt 0)
|
if ($matches[1] -gt 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue