Disables the PowerShell verbose progress when installing or updating a package. Fixes #175
Fixes an issue that may occur if Chocolatey is installed in the same session that this resource is run in. The PowerShell Environment variable $env:ChocolateyInstall may be null. If this happens then assign it the value from the System environment variable ChocolateyInstall. Fixes #174
Motivation and Context
Disabling the PowerShell Verbose progress stops the log being filled with unnecessary information.
Fixing the environment variable prevents this provider crashing when the Chocolatey appliction is installed in the same session.
Testing
Disabling progress was tested by running an installation on a server with Verbose logging enabled. The excessive logging was not disaplyed with the change.
The provider crash was seen when running on a new server intermittently.
With this change the provider did not crash in 4 runs.
No changes have been made to the Pester tests.
Operating Systems Testing
Server 2022
Change Types Made
[x] Bug fix (non-breaking change).
[x] Feature / Enhancement (non-breaking change).
[ ] Breaking change (fix or feature that could cause existing functionality to change).
Description Of Changes
Disables the PowerShell verbose progress when installing or updating a package. Fixes #175 Fixes an issue that may occur if Chocolatey is installed in the same session that this resource is run in. The PowerShell Environment variable $env:ChocolateyInstall may be null. If this happens then assign it the value from the System environment variable ChocolateyInstall. Fixes #174
Motivation and Context
Disabling the PowerShell Verbose progress stops the log being filled with unnecessary information. Fixing the environment variable prevents this provider crashing when the Chocolatey appliction is installed in the same session.
Testing
Disabling progress was tested by running an installation on a server with Verbose logging enabled. The excessive logging was not disaplyed with the change. The provider crash was seen when running on a new server intermittently. With this change the provider did not crash in 4 runs.
No changes have been made to the Pester tests.
Operating Systems Testing
Server 2022
Change Types Made
Change Checklist
Related Issue
175, #174
Fixes #