NestedModules breaks when specifying a full ModuleSpecification which matches more than one module - by Joel 'Jaykul' Bennett

Status : 

 


1
0
Sign in
to vote
ID 783131 Comments
Status Active Workarounds
Type Bug Repros 0
Opened 4/6/2013 1:43:38 PM
Access Restriction Public

Description

If a Module psd1 file specifies NestedModules by hashtable with ModuleName and ModuleVersion, it will fail to load if there is more than one module with that name available on the system (even if the ModuleVersion only matches one of the modules).

Note that if a Module psd1 file specifies NestedModules by name only, you can have exact the same module available in two places in your PSModulePath without problems.
Sign in to post a comment.
Posted by Joel 'Jaykul' Bennett on 4/6/2013 at 9:39 PM
RequiredModules doesn't have this problem with version numbers, so it's probably much safer to use that.
Posted by Joel 'Jaykul' Bennett on 4/6/2013 at 2:10 PM
Note that if you specify the nested module by name only it will work, but WHICH module is loaded is purely based on the path order precedence in your PSModulePath.