Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(chocolateyGH-520) Fix: Debug/Verbose messages not logged
`Write-Debug` / `Write-Verbose` messages are not being logged when coming from the `chocolateyInstall`/`chocolateyUninstall` scripts. This is due to `DebugPreference` / `VerbosePreference` being only set to script level in the module and not global. Instead of changing a global variable, also set the Debug and Verbose preferences in the script runner. It is thought that changing a global variable could have other unintended consequences if someone was running these scripts directly from PowerShell. So prefer the script level change.
- Loading branch information