PSAppDeployToolkit
PSAppDeployToolkit copied to clipboard
Behaviour of "Resolve-Error" was changed inadvertently
Describe the bug Only toplevel error records get logged. "Inner" error records get lost.
To Reproduce Within a Deploy-Application.ps1 script file, enter an invalid command, e. g. Execute-Process -Path "DoesNotExist.exe" Run the script. I would expect the log to contain "The term 'DoesNotExist.exe' is not recognized as the name of a cmdlet ... ', like this was the case with older versions of the toolkit. (For example, in version 3.6.8 the logging appeared to be like this) Instead, in the current version of the toolkit, the log only contains a very general message like "Function failed ..."
Screenshots
Version 3.8.4
Version 3.6.8
Toolkit Version: 3.8.4
Powershell Version: 5.1.19041.906
Additional context See also "Logging of Error Records" in the forum
I noticed the same problem and use Resolve-Error -Property ('Message','ScriptStackTrace','PositionMessage') as a workaround, omitting the 'InnerException'-property which is used by default
I have tested and confirmed this is not reproducible in the next release, which reverts the changes made to this function in v3.8.4.
Fixed in v3.9.0.