boxstarter icon indicating copy to clipboard operation
boxstarter copied to clipboard

(GH-501) Fix Propagation of VerbosePreference to Reduce Verbose Logging

Open MalwareMechanic opened this issue 3 years ago • 1 comments

Description Of Changes

Updated how VerbosePreference was being used to propagate the verbose setting for new choco.exe processes and during Boxstarter environment variable restoration.

Motivation and Context

The VerbosePreference parameter was not being set correctly for new choco.exe processes as well as when exporting Boxstarter environment variables resulting in verbose output during subprocess Chocolatey package installations.

Testing

Tested on Windows 11 (21H2 22000.593). Added a new test to check the -Verbose parameter is not being set incorrectly. Did not add a test to check for correct environment variable restoration since the test Export-BoxstarterVars in Chocolatey.tests.ps1 failed complete -- likely a scheduled task issue.

Change Types Made

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

Related Issue

Fixes #501

Change Checklist

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

MalwareMechanic avatar Jul 18 '22 16:07 MalwareMechanic

thanks for getting this fixed @MalwareMechanic !

CC @gep13 - I think we're having some issues with gitversion in the appveyor build - 3.1.0-fix-verbose-output-20220718 is too long as package version and hence breaks the build -> any suggestions on how to (permanently) get this fixed?

mwallner avatar Jul 19 '22 06:07 mwallner

I see this fixes my issue 🙂 Any possibility for getting this merged? This will make it possible for me to finally test out v3

Baune8D avatar Aug 23 '22 12:08 Baune8D

@mwallner Any thoughts on when a hotfix release can be made so this fix helps reduce the verbose output for everyone using the V3?

MalwareMechanic avatar Oct 24 '22 14:10 MalwareMechanic

@mwallner Any thoughts on when a hotfix release can be made so this fix helps reduce the verbose output for everyone using the V3?

+1 for this, im also holding out on trying v3 until this fix gets released👍

Baune8D avatar Oct 25 '22 07:10 Baune8D

heya, not going to make any promises, but I can tell you that I'm working on two (other) different defect-type-issues that will make it into a bugfix-type version somewhen soonish. in that upcoming release, this will also be included. hth, sorry to not being able to give you a more detailed answer

mwallner avatar Oct 25 '22 20:10 mwallner