mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-24 05:40:23 -07:00
win_chocolatey - Fix incompatibilities with latest Chocolatey release (#53841)
This commit is contained in:
parent
e0c0e9a10b
commit
cac3c6efcf
3 changed files with 9 additions and 1 deletions
|
@ -326,7 +326,10 @@ Function Get-ChocolateyPackageVersion {
|
|||
|
||||
$command = Argv-ToString -arguments @($choco_path, "list", "--local-only", "--exact", "--limit-output", "--all-versions", $name)
|
||||
$res = Run-Command -command $command
|
||||
if ($res.rc -ne 0) {
|
||||
|
||||
# Chocolatey v0.10.12 introduced enhanced exit codes, 2 means no results, e.g. no package
|
||||
#
|
||||
if ($res.rc -notin @(0, 2)) {
|
||||
$module.Result.command = $command
|
||||
$module.Result.rc = $res.rc
|
||||
$module.Result.stdout = $res.stdout
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue