Powershell: SAVE-HELP fails to fill in INNEREXCEPTION

Created on 25 Jul 2020  路  3Comments  路  Source: PowerShell/PowerShell

Steps to reproduce

SAVE-HELP TEMP:PSHELP Microsoft.PowerShell.Core
$ERROR | SELECT -F:1 | % EXCEPTION | % INNEREXCEPTION | SHOULD -NOT -BENULLOREMPTY

Expected behavior

Save-Help: Failed to save Help for the module(s) 'Microsoft.PowerShell.Core' with UI culture(s) {en-GB} : One or more errors occurred. (The SSL connection could not be established, see inner exception.).
English-US help content is available and can be saved using: Save-Help -UICulture en-US.

Actual behavior

Save-Help: Failed to save Help for the module(s) 'Microsoft.PowerShell.Core' with UI culture(s) {en-GB} : One or more errors occurred. (The SSL connection could not be established, see inner exception.).
English-US help content is available and can be saved using: Save-Help -UICulture en-US.
InvalidResult:
Line |
   1 | $ERROR | SELECT -F:1 | % EXCEPTION | % INNEREXCEPTION | SHOULD -NOT -BENULLOREMPTY
     | Expected a value, but got $null or empty.

Environment data

Name                           Value
----                           -----
PSVersion                      7.0.3
PSEdition                      Core
GitCommitId                    7.0.3
OS                             Microsoft Windows 10.0.18363
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0鈥
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
Issue-Question Resolution-Answered

Most helpful comment

Save-Help probably shouldn't be emitting that error though. Someone probably used task.Result instead of task.GetAwaiter().GetResult() somewhere (the former throws AggregateException, the latter throws the real exception).

All 3 comments

Looks like an AggregateException. Check InnerExceptions (note the trailing s)

Save-Help probably shouldn't be emitting that error though. Someone probably used task.Result instead of task.GetAwaiter().GetResult() somewhere (the former throws AggregateException, the latter throws the real exception).

This issue has been marked as answered and has not had any activity for 1 day. It has been closed for housekeeping purposes.

Was this page helpful?
0 / 5 - 0 ratings