@@ -652,13 +652,15 @@ private Hashtable GetMetadataFromNupkg(string packageName, string packagePath, s
652
652
var currentFiles = Directory . GetFiles ( tempDiscoveryPath ) ;
653
653
654
654
string psd1FilePath = String . Empty ;
655
+ string ps1FilePath = String . Empty ;
655
656
string nuspecFilePath = String . Empty ;
656
657
string pkgNamePattern = $ "{ packageName } *";
657
658
Regex rgx = new ( pkgNamePattern , RegexOptions . IgnoreCase ) ;
658
659
foreach ( var x in currentFiles )
659
660
{
660
661
if ( rgx . IsMatch ( x ) )
661
662
{
663
+ _cmdletPassedIn . WriteVerbose ( "file is a match: " + x ) ;
662
664
if ( x . EndsWith ( "psd1" ) )
663
665
{
664
666
psd1FilePath = x ;
@@ -667,15 +669,13 @@ private Hashtable GetMetadataFromNupkg(string packageName, string packagePath, s
667
669
{
668
670
nuspecFilePath = x ;
669
671
}
672
+ else if ( x . EndsWith ( "ps1" ) )
673
+ {
674
+ ps1FilePath = x ;
675
+ }
670
676
}
671
- _cmdletPassedIn . WriteVerbose ( $ "file found: " + x ) ;
672
-
673
- }
674
677
675
- foreach ( var x in currentFiles )
676
- {
677
678
_cmdletPassedIn . WriteVerbose ( $ "file found: " + x ) ;
678
-
679
679
}
680
680
681
681
var files = Directory . EnumerateFiles ( tempDiscoveryPath , "*.*" , SearchOption . AllDirectories ) . Where (
@@ -688,7 +688,7 @@ private Hashtable GetMetadataFromNupkg(string packageName, string packagePath, s
688
688
}
689
689
690
690
// string psd1FilePath = Path.Combine(tempDiscoveryPath, $"{packageName}.psd1");
691
- string ps1FilePath = Path . Combine ( tempDiscoveryPath , $ "{ packageName } .ps1") ;
691
+ // string ps1FilePath = Path.Combine(tempDiscoveryPath, $"{packageName}.ps1");
692
692
// string nuspecFilePath = Path.Combine(tempDiscoveryPath, $"{packageName}.nuspec");
693
693
694
694
List < string > pkgTags = new List < string > ( ) ;
0 commit comments