Building Convert-HelpToHtmlTree over network might corrupt the build
.NET, PowerShell, SQL, Java, Perl, and Javascript developer libraries
Brought to you by:
msorens
Building a HTML Tree might not work correctly when the NameSpace is located on a network share.
Providing a custom path to make user the source is from a local disk using a paramater -NameSpacePath will take care of such issues.
Param(
[parameter(Mandatory=$true)][String[]]$NameSpaces,
[string]$NameSpacePath,
[string]$TargetDir = ".",
[string]$TemplateName = "",
[string]$DocTitle = "",
[string]$Copyright = "",
[string]$RevisionDate = "",
[int]$OutputWidth = $host.UI.RawUI.BufferSize.Width
)
The $NameSpacePath must be uncluded in $env:PSModulePath if used.
And if not provided, the standard user module path has to be used.
if (!$NameSpacePath) # go for the standard user path
{ $script:ModulePath = Get-UserPsModulePath }
elseif (!(($env:PSModulePath).Contains($NameSpacePath))) # ModulePath wasn't added before
{$env:PSModulePath = $env:PSModulePath + ";$NameSpacePath"}
Replace all occurences of PSModulePath in the .psm1 with $NameSpacePath
Where is the edit feature of the tickets :/
Building a HTML Tree might not work correctly when the NameSpace is located in a network synced folder.
Providing a custom root path to make sure the namespace source is from a local disk using a paramater -NameSpaceRoot will take care of such issues.
The $NameSpaceRoot must be included in $env:PSModulePath if used.
Replace all occurences of Get-UserPsModulePath in the .psm1 with $NameSpaceRoot
Last edit: Dennis Lindqvist 2015-09-29
Thanks for your detailed bug reports--and proposed code fixes!
As far as editing... I think I have now added permissions for you to be able to edit your posts... let me know if it works.
For this issue, I have adapted your code fragment and integrated it into the file attached. Try it out and let me know if it works for your situation.
Thanks Michael,
I've always been able to edit my posts, not just the actual ticket.
I do have a couple of new options in all posts (not just my own).
I don't feel comfortable with beeing able to edit or delete your posts as well though ;)
Last edit: Dennis Lindqvist 2015-10-01
The 134-fix killed my PoSH console.
I do have a version of my own with these fixes that is working (see attachment).
Last edit: Dennis Lindqvist 2015-10-01
Dennis:
Sorry, thought I replied to this earlier...
While I would like to incorporate improvements, when I did a diff on your file it shows the entire file overhauled so there's no way I can see just the substance of what you changed...
Also, any notion of why my file did not work for you?