Skip to content

Commit 4667333

Browse files
committed
only set filePath if the filename is an exact match
1 parent b1f82be commit 4667333

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/code/Utils.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1196,24 +1196,24 @@ internal static void GetMetadataFilesFromPath(string dirPath, string packageName
11961196
if (string.Compare($"{packageName}.psd1", fileName, StringComparison.OrdinalIgnoreCase) == 0)
11971197
{
11981198
properCasingPkgName = Path.GetFileNameWithoutExtension(file);
1199+
psd1FilePath = file;
11991200
}
1200-
psd1FilePath = file;
12011201
}
12021202
else if (file.EndsWith("nuspec"))
12031203
{
12041204
if (string.Compare($"{packageName}.nuspec", fileName, StringComparison.OrdinalIgnoreCase) == 0)
12051205
{
12061206
properCasingPkgName = Path.GetFileNameWithoutExtension(file);
1207+
nuspecFilePath = file;
12071208
}
1208-
nuspecFilePath = file;
12091209
}
12101210
else if (file.EndsWith("ps1"))
12111211
{
12121212
if (string.Compare($"{packageName}.ps1", fileName, StringComparison.OrdinalIgnoreCase) == 0)
12131213
{
12141214
properCasingPkgName = Path.GetFileNameWithoutExtension(file);
1215+
ps1FilePath = file;
12151216
}
1216-
ps1FilePath = file;
12171217
}
12181218
}
12191219
}

0 commit comments

Comments
 (0)