When using PS normal console's auto-complete, the address that auto completed contains a slash at the end.
In this case, the function (in line 79 in "Initialize-ModulePortable.ps1") does a replace of $path (that includes '\' at its end) to $psscriptroot, that causes the final result to be without the slash after $psscriptroot.
For example, if I run this command:
Initialize-ModulePortable -Name FileSplitter -Path C:\Users\Me\Desktop\ -Download
The file that will be created will contain that:
$Modules = @(
"$PSScriptRootfilesplitter\1.3\FileSplitter.psd1"
)
foreach ($_ in $Modules) {
Import-Module $_ -Verbose:$false -Force
}
If I am right in my diagnosis, it can be fixed by checking if $Path contains a slash (or back-slash) at its end and delete it.
When using PS normal console's auto-complete, the address that auto completed contains a slash at the end.
In this case, the function (in line 79 in "Initialize-ModulePortable.ps1") does a replace of $path (that includes '\' at its end) to $psscriptroot, that causes the final result to be without the slash after $psscriptroot.
For example, if I run this command:
The file that will be created will contain that:
If I am right in my diagnosis, it can be fixed by checking if $Path contains a slash (or back-slash) at its end and delete it.