You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Get-PlasterTemplate -IncludeInstalledModules return templates from all installed module versions #348
I've noticed that if I have several version of the same module containing a plaster template inside (even if the manifest has the same version), Get-PlasterTemplate cmdlet returns all instances of the templates from all the versions of the same module. So if I have the following:
MyTemplatesPSModule v 1.0.0.0
MyTemplate v1.0.0.0
MyTemplatesPSModule v1.0.0.1
MyTemplate v1.0.0.0
MyTemplatesPSModule v1.0.0.2
MyTemplate v1.0.0.1
Running Get-PlasterTemplate -IncludeInstalledModules currently returns all three templates (besides the default ones). This behavior makes me want to make sure that I uninstall previous versions of such modules right after Update-Module. Is there really a need to go through all the PS Module versions instead of just the latest ones? To me it seems that going through the latest ones only should be the default behavior (similar to Import-Module) besides, it should run faster. If there's actually a need to expand all previous module versions, the functionality could still be accessible through a dedicated switch (i.e. -ExpandAllModuleVersions). There might as well also be an additional switch (i.e. -IncludeAllTemplates) to list out all template instances even if their versions are identical, as follows:
According to the Get-PlasterTemplate cmdlet documentation, this is not how it is supposed to work. Get-PlasterTemplate -IncludeInstalledModules should only return the latest versions. Use of the flag -ListAvailable is supposed to return all versions.
Activity
Glober777 commentedon May 13, 2019
Does anyone have any opinion on this matter?
rlvandaveer commentedon Aug 1, 2019
According to the Get-PlasterTemplate cmdlet documentation, this is not how it is supposed to work.
Get-PlasterTemplate -IncludeInstalledModulesshould only return the latest versions. Use of the flag-ListAvailableis supposed to return all versions.