diff --git a/chocolatey/plugins/module_utils/Common.psm1 b/chocolatey/plugins/module_utils/Common.psm1 index ac37663..6d6332f 100644 --- a/chocolatey/plugins/module_utils/Common.psm1 +++ b/chocolatey/plugins/module_utils/Common.psm1 @@ -54,7 +54,7 @@ function Get-ChocolateyCommand { $IgnoreMissing ) - $command = Get-Command -Name choco.exe -CommandType Application -ErrorAction SilentlyContinue + $command = Get-Command -Name choco.exe -CommandType Application -ErrorAction SilentlyContinue -TotalCount 1 if (-not $command) { $installDir = if ($env:ChocolateyInstall) { diff --git a/chocolatey/plugins/modules/win_chocolatey.py b/chocolatey/plugins/modules/win_chocolatey.py index 0793367..4561800 100644 --- a/chocolatey/plugins/modules/win_chocolatey.py +++ b/chocolatey/plugins/modules/win_chocolatey.py @@ -21,6 +21,7 @@ description: - Manage packages using Chocolatey. - If Chocolatey is missing from the system, the module will install it. +- If there are multiple installations of choco.exe in env:PATH, it will use the first found one requirements: - chocolatey >= 0.10.5 (will be upgraded if older) options: