chocolatey / cChoco

Community resource to manage Chocolatey
Apache License 2.0
154 stars 99 forks source link

* Disables Verbose progress during install and upgrade (#175). #178

Open rcarpenter79 opened 1 year ago

rcarpenter79 commented 1 year ago

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 #