Skip to content

Commit

Permalink
ChocolateyPackage: Avoid duplicate choco.exe (#70)
Browse files Browse the repository at this point in the history
Co-authored-by: Gael <[email protected]>
  • Loading branch information
Jaykul and gaelcolas committed Apr 2, 2023
1 parent bd094df commit 13e6504
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed

- Modified project with new Sampler template.
- Invoking choco commands now always add `--no-progress` & `--limit-output`
- Invoking choco commands now always add `--no-progress` & `--limit-output`.
- Limiting Get-Command choco to the first result as per [#69](https://github.com/chocolatey-community/Chocolatey/issues/69).
- Changed `ChocolateySoftware` to be class-based DSC Resource.
- Changed `ChocolateyPackage` to be class-based DSC Resource.
- Changed `ChocolateySource` to be a class-based DSC Resource.
Expand Down
2 changes: 1 addition & 1 deletion source/public/Install-ChocolateyPackage.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ function Install-ChocolateyPackage
begin
{
$null = $PSboundParameters.remove('Name')
if (-not ($chocoCmd = Get-Command 'choco.exe' -CommandType 'Application' -ErrorAction 'SilentlyContinue'))
if (-not ($chocoCmd = @(Get-Command 'choco.exe' -CommandType 'Application' -ErrorAction 'SilentlyContinue')[0]))
{
throw "Chocolatey Software not found."
}
Expand Down

0 comments on commit 13e6504

Please sign in to comment.