Description
Steps to reproduce
I have created updatable help system according to docs.microsoft.com pages
You may see the module here. Module info and content files are inside cab
directory.
It is working fine in Windows PowerShell, but not in PowerShell Core v.6.2
Update-Help -Module InstallModuleFromGit -Verbose -Force
Expected behavior
This is the output from Windows PowerShell session.
VERBOSE: Your connection has been redirected to the following URI: "http://github.com/iricigor/InstallModuleFromGit/raw/master/cab/"
VERBOSE: Performing the operation "Update-Help" on target "InstallModuleFromGit, Current Version: 0.0.0.0, Available Version: 1.0.0.0, UICulture:
en-US".
VERBOSE: InstallModuleFromGit: Updated W:\PowerShell\GitHub\InstallModuleFromGit\en-US\InstallGitModule-help.xml. Culture en-US Version 1.0.0.0
VERBOSE: InstallModuleFromGit: Updated W:\PowerShell\GitHub\InstallModuleFromGit\en-US\InstallModuleFromGit-help.xml. Culture en-US Version 1.0.0.0
Actual behavior
And this is the output from PowerShell Core.
VERBOSE: Your connection has been redirected to the following URI: "http://github.com/iricigor/InstallModuleFromGit/raw/master/cab/"
VERBOSE: Performing the operation "Update-Help" on target "InstallModuleFromGit, Current Version: 0.0.0.0, Available Version: 1.0.0.0, UICulture: en-US".
VERBOSE: Your connection has been redirected to the following URI: "https://github.com/iricigor/InstallModuleFromGit/raw/master/cab/"
VERBOSE: Performing the operation "Update-Help" on target "InstallModuleFromGit, Current Version: 0.0.0.0, Available Version: 1.0.0.0, UICulture: en-US".
update-help : Failed to update Help for the module(s) 'InstallModuleFromGit' with UI culture(s) {en-US} : Help content cannot be found. Make sure the server is available and the help content location is properly defined in the HelpInfo XML.
At line:1 char:1
+ update-help -Module InstallModuleFromGit -Verbose -Force
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (:) [Update-Help], Exception
+ FullyQualifiedErrorId : HelpContentNotFound,Microsoft.PowerShell.Commands.UpdateHelpCommand
Environment data
Name Value
---- -----
PSVersion 6.2.0
PSEdition Core
GitCommitId 6.2.0
OS Microsoft Windows 10.0.17763
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Comment 1
I have compared my setup and PowerShell built-in modules setup and the only difference I noticed was https
(my setup) vs. http
protocol (PowerShell modules). So, I tried to use http
to prove it in new branch, but I could not give proof as GitHub seems to redirect download requests, as visible in the PS Core output above. Notice that first redirect points to http, and 2nd one to https and then it fails.
Comment 2
I have tried also to simulate really missing files and in that case I receive one more error before the one above. This new error says:
Response status code does not indicate success: 404 (Not Found)
Comment 3
Even if this turns out to be my setup problem, I think such generic error messages should be improved. The error HelpContentNotFound
was being thrown if anything fails, without real control if content is found or not. Also, at least it my experience it looks like InnerException is just dismissed, as I was not able to see it in any error.