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
Debug/Verbose messages not logged in automation scripts #520
Comments
ferventcoder
added a commit
to ferventcoder/choco
that referenced
this issue
Dec 28, 2015
`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.
ferventcoder
added a commit
that referenced
this issue
Jan 1, 2016
* stable: (doc) update Changelog (GH-8) Use Custom PowerShell Host (GH-8) Configuration for PowerShell Host (GH-8) Implement Custom PowerShell Host (GH-8) Add System.Management.Automation binary (GH-8) Convert to SecureString (GH-8) ReadKey Timeout (GH-8) Run commands with timeout (maint) add messages to package installers (GH-8) ReadLine Timeout (GH-445) Scenario docs update (GH-520) Fix: Debug/Verbose messages not logged
ferventcoder
changed the title
Debug/Verbose messages not logged in install scripts
Debug/Verbose messages not logged in automation scripts
Jan 29, 2016
ferventcoder
added a commit
that referenced
this issue
Feb 11, 2016
There are instances where the settings were not being applied, such as logging in script blocks. Ensure the preferences are set globally.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Write-Debug / Write-Verbose messages are not being logged when coming from the chocolateyInstall/chocolateyUninstall scripts. This is due to
DebugPreference
andVerbosePreference
being only set to script level in the module and not global.The text was updated successfully, but these errors were encountered: