File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
tools/VersionController/Models Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -267,7 +267,7 @@ public Version GetVersionBumpUsingSerialized(bool serialize = true)
267267 {
268268 powershell . AddScript ( "(Test-ModuleManifest -Path " + outputModuleManifestPath + ").NestedModules" ) ;
269269 var cmdletResult = powershell . Invoke ( ) ;
270- nestedModules = cmdletResult . Select ( c => c . ToString ( ) + ".dll" ) ;
270+ nestedModules = cmdletResult . Select ( c => c . ToString ( ) ) ;
271271 }
272272
273273 Version versionBump = Version . PATCH ;
@@ -290,9 +290,17 @@ public Version GetVersionBumpUsingSerialized(bool serialize = true)
290290 }
291291
292292 requiredModules . Add ( outputModuleDirectory ) ;
293- foreach ( var nestedModule in nestedModules )
293+ foreach ( var nestedModuleName in nestedModules )
294294 {
295+ // Handcrafted modules assume its nested module always is DLL file.
296+ var nestedModule = nestedModuleName + ".dll" ;
295297 var assemblyPath = Directory . GetFiles ( outputModuleDirectory , nestedModule , SearchOption . AllDirectories ) . FirstOrDefault ( ) ;
298+
299+ // However we support PSM1, PSD1 other nested module type. Skip this check and we need to use a different design soon.
300+ if ( assemblyPath == null )
301+ {
302+ continue ;
303+ }
296304 var proxy = new CmdletLoader ( ) ;
297305 var newModuleMetadata = proxy . GetModuleMetadata ( assemblyPath , requiredModules ) ;
298306 var serializedCmdletName = nestedModule + ".json" ;
You can’t perform that action at this time.
0 commit comments