Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 2 commits into
base: development
Choose a base branch
from

Conversation

rcarpenter79
Copy link

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

  • Bug fix (non-breaking change).
  • Feature / Enhancement (non-breaking change).
  • Breaking change (fix or feature that could cause existing functionality to change).
  • Documentation changes.
  • PowerShell code changes.

Change Checklist

  • Requires a change to the documentation.
  • Documentation has been updated.
  • Tests to cover my changes, have been added.
  • All new and existing tests passed?
  • PowerShell code changes: PowerShell v2 compatibility checked?

Related Issue

#175, #174

Fixes #

Carpenter, Richard added 2 commits July 7, 2023 09:55
Assigns $env:ChocolateyInstall from the System environment variable if $env:ChocolateyInstal is $null (chocolatey#174)
bozho added a commit to bozho/cChoco that referenced this pull request Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant