win_chocolatey Fix incompatibilities with latest Chocolcatey release
This commit is contained in:
parent
995a7e6453
commit
7ee89d4ac6
2 changed files with 4 additions and 1 deletions
2
changelogs/fragments/win_chocolatey-update.yaml
Normal file
2
changelogs/fragments/win_chocolatey-update.yaml
Normal file
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- win_chocolatey - Fix incompatibilities with the latest release of Chocolatey ``v0.10.12+``
|
|
@ -155,7 +155,8 @@ Function Choco-IsInstalled
|
|||
Fail-Json -obj $result -message "Error checking installation status for package 'package': $($_.Exception.Message)"
|
||||
}
|
||||
|
||||
if ($LastExitCode -ne 0) {
|
||||
# Chocolatey v0.10.12 introduced enhanced exit codes, 2 means no results, e.g. no package
|
||||
if ($LastExitCode -notin @(0, 2)) {
|
||||
$result.rc = $LastExitCode
|
||||
$result.command = "$script:executable list $options"
|
||||
$result.stdout = $output | Out-String
|
||||
|
|
Loading…
Reference in a new issue